Class: Monads::Failure
Constant Summary
Constants inherited from Result
Class Method Summary collapse
Methods inherited from Result
Methods included from Monad
#fmap, included, #initialize, #join, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Monads::Monad
Class Method Details
.new(value) ⇒ Object
47 48 49 50 |
# File 'lib/monads/result.rb', line 47 def self.new(value) raise TypeError, "value should not be of #{value.class}" unless value.is_a?(FAILURE_TRIGGER) super end |