Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rabal/util.rb

Instance Method Summary collapse

Instance Method Details

#camelizeObject



26
27
28
# File 'lib/rabal/util.rb', line 26

def camelize
    partition.collect { |c| c.capitalize }.join("")
end

#dashifyObject



22
23
24
# File 'lib/rabal/util.rb', line 22

def dashify
    partition.join('-')
end

#underscoreObject



18
19
20
# File 'lib/rabal/util.rb', line 18

def underscore
    partition.join("_")
end