Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/restfulx/configuration.rb

Instance Method Summary collapse

Instance Method Details

#dcfirstObject

Down-case first character of a string leaving the rest of it intact



20
21
22
# File 'lib/restfulx/configuration.rb', line 20

def dcfirst
  self[0,1].downcase + self[1..-1]
end

#ucfirstObject

Upper-case first character of a string leave the rest of the string intact



15
16
17
# File 'lib/restfulx/configuration.rb', line 15

def ucfirst
  self[0,1].capitalize + self[1..-1]
end