Class: DoNotEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/folding_at_home_client/request.rb

Class Method Summary collapse

Class Method Details

.decode(params) ⇒ Object



14
15
16
# File 'lib/folding_at_home_client/request.rb', line 14

def self.decode(params)
  Faraday::FlatParamsEncoder.decode(params)
end

.encode(params) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/folding_at_home_client/request.rb', line 4

def self.encode(params)
  buffer = ''

  params.each do |key, value|
    buffer << "#{key}=#{value}&"
  end

  buffer.chop
end