Parent

Class/Module Index [+]

Quicksearch

ActionDispatch::Http::UploadedFile

Attributes

content_type[RW]
headers[RW]
original_filename[RW]
tempfile[RW]

Public Class Methods

new(hash) click to toggle source
# File lib/action_dispatch/http/upload.rb, line 6
def initialize(hash)
  @original_filename = encode_filename(hash[:filename])
  @content_type      = hash[:type]
  @headers           = hash[:head]
  @tempfile          = hash[:tempfile]
  raise(ArgumentError, ':tempfile is required') unless @tempfile
end

Public Instance Methods

open() click to toggle source
# File lib/action_dispatch/http/upload.rb, line 14
def open
  @tempfile.open
end
path() click to toggle source
# File lib/action_dispatch/http/upload.rb, line 18
def path
  @tempfile.path
end
read(*args) click to toggle source
# File lib/action_dispatch/http/upload.rb, line 22
def read(*args)
  @tempfile.read(*args)
end
rewind() click to toggle source
# File lib/action_dispatch/http/upload.rb, line 26
def rewind
  @tempfile.rewind
end
size() click to toggle source
# File lib/action_dispatch/http/upload.rb, line 30
def size
  @tempfile.size
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.