Class: Deterministic::Option::None
- Inherits:
-
Deterministic::Option
- Object
- Deterministic::Option
- Deterministic::Option::None
- Defined in:
- lib/deterministic/option.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(*args) ⇒ None
constructor
A new instance of None.
- #inspect ⇒ Object
-
#none(*args) ⇒ Object
(also: #fmap, #map)
def value self end.
Methods inherited from Deterministic::Option
any?, #none?, some?, #some?, to_option, try!
Methods included from PatternMatching
Methods included from Monad
Constructor Details
#initialize(*args) ⇒ None
Returns a new instance of None.
62 |
# File 'lib/deterministic/option.rb', line 62 def initialize(*args); end |
Instance Method Details
#==(other) ⇒ Object
78 79 80 |
# File 'lib/deterministic/option.rb', line 78 def ==(other) other.class == self.class end |
#inspect ⇒ Object
64 65 66 |
# File 'lib/deterministic/option.rb', line 64 def inspect "None" end |
#none(*args) ⇒ Object Also known as: fmap, map
def value
self
end
71 72 73 |
# File 'lib/deterministic/option.rb', line 71 def none(*args) self end |