class Either::Right

Attributes

val[R]

Public Class Methods

new(val) click to toggle source
# File lib/either.rb, line 61
def initialize(val)
  @val = val
end

Public Instance Methods

flat_map() { |val| ... } click to toggle source
# File lib/either.rb, line 69
def flat_map
  yield val
end
left?() click to toggle source
# File lib/either.rb, line 54
def left?
  false
end
map() { |val| ... } click to toggle source
# File lib/either.rb, line 65
def map
  Either.new { yield val }
end
right?() click to toggle source
# File lib/either.rb, line 57
def right?
  true
end