Class: Monads::Nothing
Instance Method Summary collapse
-
#bind(&block) ⇒ Object
- bind
-
(a -> M b) -> M a -> M b.
-
#initialize ⇒ Nothing
constructor
A new instance of Nothing.
Methods inherited from Maybe
Methods included from Monad
#fmap, included, #join, #method_missing
Constructor Details
#initialize ⇒ Nothing
Returns a new instance of Nothing.
39 40 |
# File 'lib/ruby-monads/maybe.rb', line 39 def initialize end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Monads::Monad
Instance Method Details
#bind(&block) ⇒ Object
- bind
-
(a -> M b) -> M a -> M b
43 44 45 |
# File 'lib/ruby-monads/maybe.rb', line 43 def bind(&block) self end |