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.



3
4
5
6
# File 'lib/uploader/file_part.rb', line 3

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

Instance Method Details

#concat(other_file) ⇒ Object



12
13
14
15
16
# File 'lib/uploader/file_part.rb', line 12

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

#original_filenameObject



8
9
10
# File 'lib/uploader/file_part.rb', line 8

def original_filename
  @filename
end