Class: ODDB::Upload

Inherits:
Object show all
Defined in:
src/util/upload.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Upload) initialize(io)

A new instance of Upload



7
8
9
10
# File 'src/util/upload.rb', line 7

def initialize(io)
  @name = io.original_filename
  @content = io.read
end

Instance Attribute Details

- (Object) content (readonly)

Returns the value of attribute content



6
7
8
# File 'src/util/upload.rb', line 6

def content
  @content
end

- (Object) name (readonly)

Returns the value of attribute name



6
7
8
# File 'src/util/upload.rb', line 6

def name
  @name
end