
require 'facets/core/string/camelcase'

class Symbol

  # Converts a symbol to camelcase. By default capitalization
  # occurs on whitespace and underscores. By setting the first
  # parameter to <tt>true</tt> the first character can also be
  # captizlized. The second parameter can be assigned a valid
  # Regualr Expression characeter set to determine which
  # characters to match for capitalizing subsequent parts of
  # the symbol.
  #
  #   :this_is_a_test.camelcase              #=> :ThisIsATest
  #   :this_is_a_test.camelcase(false)       #=> :thisIsATest
  #
  def camelcase( *args )
    self.to_s.camelcase( *args ).to_sym
  end

end


#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TCSymbol < Test::Unit::TestCase

    def test_camelcase
      assert_equal( :thisIsTest, :this_is_test.camelcase )
    end

  end

=end
