module Qs::Payload::StringifyParams

Public Class Methods

new(object) click to toggle source
# File lib/qs/payload.rb, line 68
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