Parent

Files

Class/Module Index [+]

Quicksearch

Rack::RawUpload

Constants

VERSION

Public Class Methods

new(app, opts = {}) click to toggle source
# File lib/rack/raw_upload.rb, line 9
def initialize(app, opts = {})
  @app = app
  @paths = opts[:paths]
  @explicit = opts[:explicit]
  @tmpdir = opts[:tmpdir] || Dir::tmpdir
  @paths = [@paths] if @paths.kind_of?(String)
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/raw_upload.rb, line 17
def call(env)
  kick_in?(env) ? convert_and_pass_on(env) : @app.call(env)
end
upload_path?(request_path) click to toggle source
# File lib/rack/raw_upload.rb, line 21
def upload_path?(request_path)
  return true if @paths.nil?

  @paths.any? do |candidate|
    literal_path_match?(request_path, candidate) || wildcard_path_match?(request_path, candidate)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.