Class: Transflow::Publisher::Monadic
- Inherits:
-
Transflow::Publisher
- Object
- Transflow::Publisher
- Transflow::Publisher::Monadic
- Defined in:
- lib/transflow/publisher.rb
Instance Attribute Summary
Attributes inherited from Transflow::Publisher
Instance Method Summary collapse
Methods inherited from Transflow::Publisher
[], #arity, #curry, #initialize, #subscribe
Constructor Details
This class inherits a constructor from Transflow::Publisher
Instance Method Details
#call(*args) ⇒ Object
25 26 27 28 29 |
# File 'lib/transflow/publisher.rb', line 25 def call(*args) op.(*args) .or { |result| broadcast_failure(*args, result) and Left(result) } .>-> value { broadcast_success(value) and Right(value) } end |