Class: Basecamp::FileUpload

Inherits:
Object
  • 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


88
89
90
91
# File 'lib/basecamp.rb', line 88

def initialize(filename, content)
  @filename = filename
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content


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

def content
  @content
end

#filenameObject (readonly)

Returns the value of attribute filename


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

def filename
  @filename
end