Module: Jaws
- Defined in:
- lib/jaws/server.rb
Defined Under Namespace
Classes: GracefulExit, Server
Class Method Summary collapse
Class Method Details
.decapse_name(name) ⇒ Object
7 8 9 |
# File 'lib/jaws/server.rb', line 7 def self.decapse_name(name) name.gsub(%r{^([A-Z])}) { $1.downcase }.gsub(%r{([a-z])([A-Z])}) { $1 + "_" + $2.downcase } end |
.encapse_name(name) ⇒ Object
10 11 12 |
# File 'lib/jaws/server.rb', line 10 def self.encapse_name(name) name.gsub(%r{(^|_)([a-z])}) { $2.upcase } end |