Class: Dimr::Runner
- Inherits:
-
Object
- Object
- Dimr::Runner
- Defined in:
- lib/dimr.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(factory, run_method) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(factory, run_method) ⇒ Runner
Returns a new instance of Runner.
43 44 45 |
# File 'lib/dimr.rb', line 43 def initialize(factory, run_method) @run_method, @factory = run_method, factory end |
Instance Method Details
#call(*args) ⇒ Object
47 48 49 50 |
# File 'lib/dimr.rb', line 47 def call(*args) runable = @factory.call(*args) runable.public_send(@run_method) end |