Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/dtm/dtm.rb
Instance Method Summary collapse
Instance Method Details
#camelize ⇒ Object
10 11 12 |
# File 'lib/dtm/dtm.rb', line 10 def camelize strip.scan(/[\da-zA-Z]+/).collect(&:capitalize).join("") end |
#escape ⇒ Object
6 7 8 |
# File 'lib/dtm/dtm.rb', line 6 def escape URI.escape(self, /[<>\|:\*\"\?\\]/) end |
#underscore ⇒ Object
2 3 4 |
# File 'lib/dtm/dtm.rb', line 2 def underscore strip.downcase.scan(/\w+/).join("_") end |