Method: Noder::HTTP::Utils::KeySpaceConstrainedParams#to_params_hash

Defined in:
lib/noder/http/utils.rb

#to_params_hashObject



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/noder/http/utils.rb', line 37

def to_params_hash
  hash = @params
  hash.keys.each do |key|
    value = hash[key]
    if value.kind_of?(self.class)
      hash[key] = value.to_params_hash
    elsif value.kind_of?(Array)
      value.map! {|x| x.kind_of?(self.class) ? x.to_params_hash : x}
    end
  end
  hash
end