class String

Public Instance Methods

camelize() click to toggle source
# File lib/orchestrate.io/core_ext/string.rb, line 4
def camelize
  dup.tap &:camelize!
end
camelize!() click to toggle source
# File lib/orchestrate.io/core_ext/string.rb, line 8
def camelize!
  self.replace(self.split("_").each {|s| s.capitalize! }.join(""))
end
underscore() click to toggle source
# File lib/orchestrate.io/core_ext/string.rb, line 12
def underscore
  dup.tap &:underscore!
end
underscore!() click to toggle source
# File lib/orchestrate.io/core_ext/string.rb, line 16
def underscore!
  self.replace(self.scan(/[A-Z][a-z]*/).join("_").downcase)
end