class Kind::Either::Left

Public Instance Methods

and_then(&_)
Alias for: map
and_then!(&_)
Alias for: map
inspect() click to toggle source
# File lib/kind/either/left.rb, line 25
def inspect
  '#<%s value=%p>' % ['Kind::Left', value]
end
left?() click to toggle source
# File lib/kind/either/left.rb, line 5
def left?
  true
end
map(&_) click to toggle source
# File lib/kind/either/left.rb, line 15
def map(&_)
  self
end
Also aliased as: map!, then, then!, and_then, and_then!
map!(&_)
Alias for: map
then(&_)
Alias for: map
then!(&_)
Alias for: map
value_or(default = UNDEFINED, &block) click to toggle source
# File lib/kind/either/left.rb, line 9
def value_or(default = UNDEFINED, &block)
  Error.invalid_default_arg! if UNDEFINED == default && !block

  UNDEFINED != default ? default : block.call(value)
end