Class: Wayfarer::Middleware::Lazy

Inherits:
Struct
  • Object
show all
Defined in:
lib/wayfarer/middleware/lazy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of 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