Class: Fiveruns::Dash::Store::HTTP::Multipart
- Inherits:
-
Object
- Object
- Fiveruns::Dash::Store::HTTP::Multipart
- Defined in:
- lib/fiveruns/dash/store/http.rb
Constant Summary collapse
- BOUNDARY_ROOT =
'B0UND~F0R~UPL0AD'
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(file, params = {}) ⇒ Multipart
constructor
A new instance of Multipart.
- #to_s ⇒ Object
Constructor Details
#initialize(file, params = {}) ⇒ Multipart
Returns a new instance of Multipart.
136 137 138 139 |
# File 'lib/fiveruns/dash/store/http.rb', line 136 def initialize(file, params={}) @file = file @params = params end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
135 136 137 |
# File 'lib/fiveruns/dash/store/http.rb', line 135 def file @file end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
135 136 137 |
# File 'lib/fiveruns/dash/store/http.rb', line 135 def params @params end |
Instance Method Details
#content_type ⇒ Object
141 142 143 |
# File 'lib/fiveruns/dash/store/http.rb', line 141 def content_type %(multipart/form-data, boundary="#{boundary}") end |
#to_s ⇒ Object
145 146 147 |
# File 'lib/fiveruns/dash/store/http.rb', line 145 def to_s %(#{parts}\r\n#{separator}--) end |