class Kind::Maybe::None
Public Instance Methods
dig(*keys)
click to toggle source
# File lib/kind/maybe/none.rb, line 35 def dig(*keys) self end
inspect()
click to toggle source
# File lib/kind/maybe/none.rb, line 43 def inspect '#<%s value=%s>' % ['Kind::None', value.inspect] end
map(_method_name = UNDEFINED, &fn)
click to toggle source
# File lib/kind/maybe/none.rb, line 14 def map(_method_name = UNDEFINED, &fn) self end
none?()
click to toggle source
# File lib/kind/maybe/none.rb, line 12 def none?; true; end
presence()
click to toggle source
# File lib/kind/maybe/none.rb, line 39 def presence self end
try!(method_name = UNDEFINED, *args, &block)
click to toggle source
# 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
Also aliased as: try
value_or(default = UNDEFINED, &block)
click to toggle source
# File lib/kind/maybe/none.rb, line 6 def value_or(default = UNDEFINED, &block) Error.invalid_default_arg! if UNDEFINED == default && !block UNDEFINED != default ? default : block.call end