Class: Trailblazer::Operation::Controller::Else
- Inherits:
-
Object
- Object
- Trailblazer::Operation::Controller::Else
- Defined in:
- lib/trailblazer/operation/controller.rb
Overview
full-on Op[] Note: this is not documented on purpose as this concept is experimental. I don’t like it too much and prefer returns in the valid block.
Instance Method Summary collapse
- #else {|@op| ... } ⇒ Object
-
#initialize(op, run) ⇒ Else
constructor
A new instance of Else.
Constructor Details
#initialize(op, run) ⇒ Else
Returns a new instance of Else.
30 31 32 33 |
# File 'lib/trailblazer/operation/controller.rb', line 30 def initialize(op, run) @op = op @run = run end |
Instance Method Details
#else {|@op| ... } ⇒ Object
35 36 37 |
# File 'lib/trailblazer/operation/controller.rb', line 35 def else yield @op if @run end |