Class: Rack::MogileFS
- Inherits:
-
Object
- Object
- Rack::MogileFS
- Defined in:
- lib/rack/mogilefs.rb,
lib/rack/mogilefs/version.rb,
lib/rack/mogilefs/endpoint.rb,
lib/rack/mogilefs/endpoint/base.rb,
lib/rack/mogilefs/endpoint/client.rb,
lib/rack/mogilefs/endpoint/mapper.rb,
lib/rack/mogilefs/endpoint/caching.rb,
lib/rack/mogilefs/endpoint/reproxy.rb,
lib/rack/mogilefs/endpoint/rescues.rb
Defined Under Namespace
Classes: Endpoint
Constant Summary collapse
- VERSION =
"0.3.2"
Instance Method Summary collapse
- #call(env) ⇒ Object
- #endpoint ⇒ Object
-
#initialize(app, options = {}) ⇒ MogileFS
constructor
A new instance of MogileFS.
Constructor Details
#initialize(app, options = {}) ⇒ MogileFS
Returns a new instance of MogileFS.
10 11 12 |
# File 'lib/rack/mogilefs.rb', line 10 def initialize(app, ={}) @app, @options = app, end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rack/mogilefs.rb', line 14 def call(env) if env['PATH_INFO'] =~ @options[:path] endpoint.call(env) else @app.call(env) end end |