Sha256: 25755b28ea60c5185a6bcdcce103d795c15af16dce5163160b7d3f298dafd812

Contents?: true

Size: 296 Bytes

Versions: 10

Compression:

Stored size: 296 Bytes

Contents

module Uploader
  class FilePart < File
    def initialize(path, filename)
      @filename = filename
      super(path, 'a')
    end

    def original_filename
      @filename
    end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails-uploader-0.4.4 lib/uploader/file_part.rb
rails-uploader-0.4.3 lib/uploader/file_part.rb
rails-uploader-0.4.2 lib/uploader/file_part.rb
rails-uploader-0.4.1 lib/uploader/file_part.rb
rails-uploader-0.4.0 lib/uploader/file_part.rb
rails-uploader-0.3.4 lib/uploader/file_part.rb
rails-uploader-0.3.3 lib/uploader/file_part.rb
rails-uploader-0.3.2 lib/uploader/file_part.rb
rails-uploader-0.3.1 lib/uploader/file_part.rb
rails-uploader-0.3.0 lib/uploader/file_part.rb