Class: Rack::Chain::Link
- Inherits:
-
Object
- Object
- Rack::Chain::Link
- Defined in:
- lib/rack/chain.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(to) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(to) ⇒ Link
Returns a new instance of Link.
9 10 11 |
# File 'lib/rack/chain.rb', line 9 def initialize(to) @to = to end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 |
# File 'lib/rack/chain.rb', line 13 def call(env) Fiber.new do Fiber.yield @to.call(env) end.resume end |