Class: Wayfarer::Middleware::Lazy
- Inherits:
-
Struct
- Object
- Struct
- Wayfarer::Middleware::Lazy
- Defined in:
- lib/wayfarer/middleware/lazy.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
Instance Method Summary collapse
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass
5 6 7 |
# File 'lib/wayfarer/middleware/lazy.rb', line 5 def klass @klass end |
Instance Method Details
#call(task, &block) ⇒ Object
6 7 8 |
# File 'lib/wayfarer/middleware/lazy.rb', line 6 def call(task, &block) klass.new.call(task) { block.call } end |