class Maybe::Just

Attributes

val[R]

Public Class Methods

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

Public Instance Methods

flat_map() { |val| ... } click to toggle source
# File lib/maybe.rb, line 47
def flat_map
  yield val
end
is_just?() click to toggle source
# File lib/maybe.rb, line 32
def is_just?
  true
end
is_nothing?() click to toggle source
# File lib/maybe.rb, line 35
def is_nothing?
  false
end
map() { |val| ... } click to toggle source
# File lib/maybe.rb, line 43
def map
  Maybe.new { yield val }
end