Class: RRunnable

Inherits:
Object
  • Object
show all
Defined in:
lib/command_handlers/models/r_runnable.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RRunnable

Returns a new instance of RRunnable.



4
5
6
# File 'lib/command_handlers/models/r_runnable.rb', line 4

def initialize(&block)
  @block = block
end

Instance Method Details

#runObject



8
9
10
# File 'lib/command_handlers/models/r_runnable.rb', line 8

def run
  @block.call
end