Module: Rollerblades
- Defined in:
- lib/rollerblades.rb,
lib/rollerblades/utils.rb,
lib/rollerblades/routing.rb,
lib/rollerblades/version.rb
Defined Under Namespace
Classes: Application, Controller
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.to_underscore(string) ⇒ Object
2 3 4 |
# File 'lib/rollerblades/utils.rb', line 2 def self.to_underscore(string) string.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').gsub(/([a-z\d])([A-Z])/,'\1_\2').tr("-","_").downcase end |