Class: DelayedExecution::BlockRunnable

Inherits:
Object
  • Object
show all
Defined in:
lib/project/delayed_execution.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ BlockRunnable

Returns a new instance of BlockRunnable.



8
9
10
# File 'lib/project/delayed_execution.rb', line 8

def initialize(&block)
  @block = block
end

Instance Method Details

#runObject



12
13
14
# File 'lib/project/delayed_execution.rb', line 12

def run
  @block.call
end