Class: Basecamp::FileUpload
Overview
A wrapper to represent a file that should be uploaded. This is used so that the form/multi-part encoder knows when to encode a field as a file, versus when to encode it as a simple field.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename, content) ⇒ FileUpload
constructor
A new instance of FileUpload.
Constructor Details
#initialize(filename, content) ⇒ FileUpload
Returns a new instance of FileUpload.
87 88 89 90 |
# File 'lib/basecamp.rb', line 87 def initialize(filename, content) @filename = filename @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
85 86 87 |
# File 'lib/basecamp.rb', line 85 def content @content end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
85 86 87 |
# File 'lib/basecamp.rb', line 85 def filename @filename end |