Class: RRunnable
- Inherits:
-
Object
- Object
- RRunnable
- Defined in:
- lib/command_handlers/models/r_runnable.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ RRunnable
constructor
A new instance of RRunnable.
- #run ⇒ Object
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
#run ⇒ Object
8 9 10 |
# File 'lib/command_handlers/models/r_runnable.rb', line 8 def run @block.call end |