Class: String
Instance Method Summary collapse
Instance Method Details
#bytesize ⇒ Object
19 20 21 |
# File 'lib/ext/ext.rb', line 19 def bytesize size end |
#humanize ⇒ Object
14 15 16 |
# File 'lib/ext/ext.rb', line 14 def humanize self.capitalize.gsub(/[-_]+/, ' ') end |
#slugize ⇒ Object
10 11 12 |
# File 'lib/ext/ext.rb', line 10 def slugize self.downcase.gsub(/&/, 'and').gsub(/\s+/, '-').gsub(/[^a-z0-9-]/, '') end |