Module: Yrpc::Ruler
- Defined in:
- lib/yrpc/executor/executor.rb
Class Method Summary collapse
Class Method Details
.to_underscore(string) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/yrpc/executor/executor.rb', line 20 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 |