Class: RackCall
- Inherits:
-
Object
- Object
- RackCall
- Defined in:
- lib/rack-call.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, block) ⇒ RackCall
constructor
A new instance of RackCall.
Constructor Details
#initialize(app, block) ⇒ RackCall
Returns a new instance of RackCall.
3 4 5 6 |
# File 'lib/rack-call.rb', line 3 def initialize(app, block) @app = app @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
2 3 4 |
# File 'lib/rack-call.rb', line 2 def block @block end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/rack-call.rb', line 8 def call(env) block.call(env) @app.call(env) end |