Module: Rack::MogileFS::Endpoint::Base
- Included in:
- Rack::MogileFS::Endpoint
- Defined in:
- lib/rack/mogilefs/endpoint/base.rb
Overview
This contains the base functionality for serving a MogileFS file. Most of the useful stuff is layered on top the base class in other modules
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 |
# File 'lib/rack/mogilefs/endpoint/base.rb', line 14 def call(env) path = key_for_path( env['PATH_INFO'].dup ) serve_file(path) end |
#initialize(options = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/rack/mogilefs/endpoint/base.rb', line 8 def initialize(={}) @options = { :default_content_type => "image/png" }.merge() end |