Class: Rapa::Encoder

Inherits:
Object
  • Object
show all
Defined in:
lib/rapa/encoder.rb

Instance Method Summary collapse

Instance Method Details

#encode(parameters) ⇒ String

Parameters:

  • parameters (Hash)

Returns:

  • (String)


7
8
9
10
11
12
13
14
# File 'lib/rapa/encoder.rb', line 7

def encode(parameters)
  parameters.map do |key, value|
    [
      key,
      value,
    ].join("=")
  end.join("&")
end