Module: Deterministic::Either::Chain
- Included in:
- Deterministic::Either
- Defined in:
- lib/deterministic/either/chain.rb
Instance Method Summary collapse
- #chain(proc = nil, &block) ⇒ Object (also: #>>)
- #try(proc = nil, &block) ⇒ Object (also: #>=)
Instance Method Details
#chain(proc = nil, &block) ⇒ Object Also known as: >>
4 5 6 7 |
# File 'lib/deterministic/either/chain.rb', line 4 def chain(proc=nil, &block) return self if failure? bind { (proc || block).call(@value) } end |