Class: Consequence::Success

Inherits:
Monad show all
Defined in:
lib/consequence/success.rb

Instance Attribute Summary

Attributes inherited from Monad

#value

Instance Method Summary collapse

Methods inherited from Monad

#==, [], inherited, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Consequence::Monad

Instance Method Details

#<<(obj) ⇒ Object



11
12
13
14
15
# File 'lib/consequence/success.rb', line 11

def <<(obj)
  super
rescue => err
  Failure[err]
end

#>>(obj) ⇒ Object



5
6
7
8
9
# File 'lib/consequence/success.rb', line 5

def >>(obj)
  super
rescue => err
  Failure[err]
end