Class: Consequence::Something

Inherits:
Monad show all
Includes:
DelegatesToValue
Defined in:
lib/consequence/something.rb

Instance Attribute Summary

Attributes inherited from Monad

#value

Instance Method Summary collapse

Methods included from DelegatesToValue

#method_missing

Methods inherited from Monad

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

Constructor Details

This class inherits a constructor from Consequence::Monad

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Consequence::DelegatesToValue

Instance Method Details

#>>(obj) ⇒ Object



8
9
10
11
# File 'lib/consequence/something.rb', line 8

def >>(obj)
  result = super
  result.value.nil? ? Nothing[nil] : result
end