class Ramda::Internal::Functors::Maybe::Some

Some value

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/ramda/internal/functors.rb, line 57
def initialize(value)
  @value = value
end

Public Instance Methods

==(other) click to toggle source
# File lib/ramda/internal/functors.rb, line 61
def ==(other)
  instance_of?(other.class) && value == other.value
end
ap(m) click to toggle source
# File lib/ramda/internal/functors.rb, line 65
def ap(m)
  m.map(@value)
end
chain(f) click to toggle source
# File lib/ramda/internal/functors.rb, line 69
def chain(f)
  f.call(@value)
end
map(f) click to toggle source
# File lib/ramda/internal/functors.rb, line 73
def map(f)
  Maybe.of(f.call(@value))
end
none?() click to toggle source
# File lib/ramda/internal/functors.rb, line 77
def none?
  false
end
some?() click to toggle source
# File lib/ramda/internal/functors.rb, line 81
def some?
  true
end