class Kind::Maybe::None

Public Instance Methods

accept(_method_name = UNDEFINED, &fn)
Alias for: map
and_then(_method_name = UNDEFINED, &fn)
Alias for: map
and_then!(_method_name = UNDEFINED, &fn)
Alias for: map!
check(_method_name = UNDEFINED, &fn)
Alias for: map
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
Also aliased as: map!, then, then!, check, accept, reject, and_then
map!(_method_name = UNDEFINED, &fn)
Also aliased as: and_then!
Alias for: map
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
reject(_method_name = UNDEFINED, &fn)
Alias for: map
then(_method_name = UNDEFINED, &fn)
Alias for: map
then!(_method_name = UNDEFINED, &fn)
Alias for: map
try(method_name = UNDEFINED, *args, &block)
Alias for: try!
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