Class: VoiceBase::V2::Client::HashParam
- Inherits:
-
Object
- Object
- VoiceBase::V2::Client::HashParam
- Defined in:
- lib/voicebase/v2/client.rb
Instance Attribute Summary collapse
-
#k ⇒ Object
Returns the value of attribute k.
-
#v ⇒ Object
Returns the value of attribute v.
Instance Method Summary collapse
-
#initialize(k, v) ⇒ HashParam
constructor
A new instance of HashParam.
- #to_multipart ⇒ Object
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
#k ⇒ Object
Returns the value of attribute k.
203 204 205 |
# File 'lib/voicebase/v2/client.rb', line 203 def k @k end |
#v ⇒ Object
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_multipart ⇒ Object
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 |