Class: Uploader::FilePart

Inherits:
File
  • Object
show all
Defined in:
lib/uploader/file_part.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, filename) ⇒ FilePart

Returns a new instance of FilePart.



5
6
7
8
# File 'lib/uploader/file_part.rb', line 5

def initialize(path, filename)
  @filename = filename
  super(path, 'a')
end

Instance Method Details

#concat(other_file) ⇒ Object



14
15
16
17
18
# File 'lib/uploader/file_part.rb', line 14

def concat(other_file)
  binmode
  write(other_file.read)
  other_file.close
end

#original_filenameObject



10
11
12
# File 'lib/uploader/file_part.rb', line 10

def original_filename
  @filename
end