Class: Kind::Maybe::None
- Inherits:
-
Kind::Monad
- Object
- Kind::Monad
- Kind::Maybe::None
- Defined in:
- lib/kind/maybe/none.rb
Constant Summary
Constants included from Kind::Monad
Instance Method Summary collapse
- #dig(*keys) ⇒ Object
- #inspect ⇒ Object
- #map(_method_name = UNDEFINED, &fn) ⇒ Object (also: #map!, #then, #then!, #check, #accept, #reject, #and_then)
- #none? ⇒ Boolean
- #presence ⇒ Object
- #try!(method_name = UNDEFINED, *args, &block) ⇒ Object (also: #try)
- #value_or(default = UNDEFINED, &block) ⇒ Object
Instance Method Details
#dig(*keys) ⇒ Object
35 36 37 |
# File 'lib/kind/maybe/none.rb', line 35 def dig(*keys) self end |
#inspect ⇒ Object
43 44 45 |
# File 'lib/kind/maybe/none.rb', line 43 def inspect '#<%s value=%s>' % ['Kind::None', value.inspect] end |
#map(_method_name = UNDEFINED, &fn) ⇒ Object Also known as: map!, then, then!, check, accept, reject, and_then
14 15 16 |
# File 'lib/kind/maybe/none.rb', line 14 def map(_method_name = UNDEFINED, &fn) self end |
#presence ⇒ Object
39 40 41 |
# File 'lib/kind/maybe/none.rb', line 39 def presence self end |
#try!(method_name = UNDEFINED, *args, &block) ⇒ Object Also known as: try
27 28 29 30 31 |
# File 'lib/kind/maybe/none.rb', line 27 def try!(method_name = UNDEFINED, *args, &block) STRICT.kind_of(::Symbol, method_name)if UNDEFINED != method_name self end |