Class: Fiveruns::Tuneup::Multipart
- Inherits:
-
Object
- Object
- Fiveruns::Tuneup::Multipart
- Defined in:
- lib/fiveruns/tuneup/multipart.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.
13 14 15 16 |
# File 'lib/fiveruns/tuneup/multipart.rb', line 13 def initialize(file, params={}) @file = file @params = params end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
12 13 14 |
# File 'lib/fiveruns/tuneup/multipart.rb', line 12 def file @file end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
12 13 14 |
# File 'lib/fiveruns/tuneup/multipart.rb', line 12 def params @params end |
Instance Method Details
#content_type ⇒ Object
18 19 20 |
# File 'lib/fiveruns/tuneup/multipart.rb', line 18 def content_type %(multipart/form-data, boundary="#{boundary}") end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/fiveruns/tuneup/multipart.rb', line 22 def to_s %(#{parts}\r\n#{separator}--) end |