Module: Sanford::Protocol::StringifyParams
- Defined in:
- lib/sanford-protocol.rb
Class Method Summary collapse
Class Method Details
.new(object) ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/sanford-protocol.rb', line 53 def self.new(object) case(object) when Hash object.inject({}){ |h, (k, v)| h.merge(k.to_s => self.new(v)) } when Array object.map{ |item| self.new(item) } else object end end |