Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/togo/support.rb

Instance Method Summary collapse

Instance Method Details

#humanizeObject



7
8
9
# File 'lib/togo/support.rb', line 7

def humanize
  self.tr('_',' ')
end

#titleizeObject



3
4
5
# File 'lib/togo/support.rb', line 3

def titleize
  self.gsub(/\b\w/){$&.upcase}
end