Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/paynet_easy/paynet_easy_api/util/string.rb

Instance Method Summary collapse

Instance Method Details

#camelizeString

Convert string from format <this_is_the_string> or <this-is-the-string> to format <ThisIsTheString>

Returns:

  • (String)

    New string, converted to camel-case format



6
7
8
# File 'lib/paynet_easy/paynet_easy_api/util/string.rb', line 6

def camelize
  split(/_|-/).map(&:capitalize).join('')
end