Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#to_constant_nameObject



2
3
4
5
# File 'lib/ext/string.rb', line 2

def to_constant_name
  # ruby class names must start with an uppercase letter (Java types may not)
  empty? ? self : "#{self[0].upcase}#{self[1..-1]}"
end