Class: MultipartParams

Inherits:
Object
  • Object
show all
Defined in:
lib/viddler/multipart_params.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param_hash = {}) ⇒ MultipartParams

Returns a new instance of MultipartParams.



6
7
8
9
10
# File 'lib/viddler/multipart_params.rb', line 6

def initialize(param_hash={})
  @boundary_token = generate_boundary_token    
  self.content_type = "multipart/form-data; boundary=#{@boundary_token}"        
  self.body = pack_params(param_hash)    
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/viddler/multipart_params.rb', line 4

def body
  @body
end

#content_typeObject

Returns the value of attribute content_type.



4
5
6
# File 'lib/viddler/multipart_params.rb', line 4

def content_type
  @content_type
end