Class: Spid::Rack::Metadata
- Inherits:
-
Object
- Object
- Spid::Rack::Metadata
- Defined in:
- lib/spid/rack/metadata.rb
Overview
:nodoc:
Defined Under Namespace
Classes: MetadataEnv
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Metadata
constructor
A new instance of Metadata.
Constructor Details
#initialize(app) ⇒ Metadata
Returns a new instance of Metadata.
8 9 10 |
# File 'lib/spid/rack/metadata.rb', line 8 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
6 7 8 |
# File 'lib/spid/rack/metadata.rb', line 6 def app @app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/spid/rack/metadata.rb', line 12 def call(env) @metadata = MetadataEnv.new(env) return @metadata.response if @metadata.valid_request? app.call(env) end |