Class: Farah::Runner
- Inherits:
-
Object
- Object
- Farah::Runner
- Defined in:
- lib/farah.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(context, action) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(context, action) ⇒ Runner
Returns a new instance of Runner.
39 40 41 42 |
# File 'lib/farah.rb', line 39 def initialize(context, action) @context = context @action = action end |
Instance Method Details
#call(*args) ⇒ Object
44 45 46 |
# File 'lib/farah.rb', line 44 def call(*args) catch(:finish) { send(action, *args) } end |