Class: Uploader::FilePart
- Inherits:
-
File
- Object
- File
- Uploader::FilePart
- Defined in:
- lib/uploader/file_part.rb
Instance Method Summary collapse
- #concat(other_file) ⇒ Object
-
#initialize(path, filename) ⇒ FilePart
constructor
A new instance of FilePart.
- #original_filename ⇒ Object
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_filename ⇒ Object
8 9 10 |
# File 'lib/uploader/file_part.rb', line 8 def original_filename @filename end |