Class: VoiceBase::V2::Client::HashParam

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(k, v) ⇒ HashParam

Returns a new instance of HashParam.



205
206
207
# File 'lib/voicebase/v2/client.rb', line 205

def initialize(k, v)
  @k, @v = k, v
end

Instance Attribute Details

#kObject

Returns the value of attribute k.



203
204
205
# File 'lib/voicebase/v2/client.rb', line 203

def k
  @k
end

#vObject

Returns the value of attribute v.



203
204
205
# File 'lib/voicebase/v2/client.rb', line 203

def v
  @v
end

Instance Method Details

#to_multipartObject



209
210
211
# File 'lib/voicebase/v2/client.rb', line 209

def to_multipart
  return "Content-Disposition: form-data; name=\"#{CGI::escape(k.to_s)}\"\r\n\r\n#{v.to_json}\r\n"
end