Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ext/string.rb
Instance Method Summary collapse
Instance Method Details
#underscore ⇒ Object
2 3 4 |
# File 'lib/ext/string.rb', line 2 def underscore self.scan(/[A-Z][a-z]*/).join("_").downcase end |