Class: Basecamp::FileUpload

Inherits:
Object
  • Object
show all
Defined in:
lib/openwfe/extras/misc/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.



84
85
86
87
# File 'lib/openwfe/extras/misc/basecamp.rb', line 84

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

Instance Attribute Details

#contentObject (readonly)

:nodoc:



82
83
84
# File 'lib/openwfe/extras/misc/basecamp.rb', line 82

def content
  @content
end

#filenameObject (readonly)

:nodoc:



82
83
84
# File 'lib/openwfe/extras/misc/basecamp.rb', line 82

def filename
  @filename
end