class Shrine::Plugins::RackFile::UploadedFile

  1. lib/shrine/plugins/rack_file.rb
Superclass: Object

This is used to wrap the Rack hash into an IO-like object which Shrine can upload.

Methods

Public Class

  1. new

Public Instance

  1. content_type
  2. original_filename
  3. path
  4. tempfile

Attributes

Public Class methods

new (hash)
[show source]
# File lib/shrine/plugins/rack_file.rb, line 112
def initialize(hash)
  @tempfile          = hash[:tempfile]
  @original_filename = hash[:filename]
  @content_type      = hash[:type]
end

Public Instance methods

path ()
[show source]
# File lib/shrine/plugins/rack_file.rb, line 118
def path
  @tempfile.path
end