Class: Kokkai::ParamsEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/kokkai/client.rb

Class Method Summary collapse

Class Method Details

.encode(params) ⇒ Object



58
59
60
61
62
63
64
65
# File 'lib/kokkai/client.rb', line 58

def self.encode(params)
  camelized_params = Hash[params.map {|k,v| [k.to_s.to_camel.to_sym, v]}]
  str = camelized_params.map {|(key, value)|
    "#{key}=#{value}"
  }.join('&')

  return ERB::Util.url_encode(str)
end

.to_queryObject



67
68
# File 'lib/kokkai/client.rb', line 67

def self.to_query
end