Class: Basecamp::FileUpload

Inherits:
Object show all
Defined in:
lib/basecamp.rb

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

Instance Method Summary collapse

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

#contentObject (readonly)

Returns the value of attribute content.



85
86
87
# File 'lib/basecamp.rb', line 85

def content
  @content
end

#filenameObject (readonly)

Returns the value of attribute filename.



85
86
87
# File 'lib/basecamp.rb', line 85

def filename
  @filename
end