class Kind::Result::Failure

Constants

DEFAULT_TYPE

Public Instance Methods

>>(_ = UNDEFINED, &_fn)
Alias for: map
and_then(_ = UNDEFINED, &_fn)
Alias for: map
and_then!(_ = UNDEFINED, &_fn)
Alias for: map
failure?() click to toggle source
# File lib/kind/result/failure.rb, line 7
def failure?
  true
end
inspect() click to toggle source
# File lib/kind/result/failure.rb, line 29
def inspect
  '#<%s type=%p value=%p>' % ['Kind::Failure', type, value]
end
map(_ = UNDEFINED, &_fn) click to toggle source
# File lib/kind/result/failure.rb, line 17
def map(_ = UNDEFINED, &_fn)
  self
end
Also aliased as: |, >>, map!, then, then!, and_then, and_then!
map!(_ = UNDEFINED, &_fn)
Alias for: map
then(_ = UNDEFINED, &_fn)
Alias for: map
then!(_ = UNDEFINED, &_fn)
Alias for: map
value_or(default = UNDEFINED, &block) click to toggle source
# File lib/kind/result/failure.rb, line 11
def value_or(default = UNDEFINED, &block)
  Error.invalid_default_arg! if UNDEFINED == default && !block

  UNDEFINED != default ? default : block.call(value)
end
|(_ = UNDEFINED, &_fn)
Alias for: map