class ReSorcery::Maybe::Nothing

Public Instance Methods

==(other) click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 30
def ==(other)
  other.class == Nothing
end
and_then() click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 10
def and_then
  self
end
as_json(*) click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 34
def as_json(*)
  {
    kind: :nothing,
  }
end
assign(_name) click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 26
def assign(_name)
  self
end
get_or_else(&block) click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 22
def get_or_else(&block)
  block.call
end
map() click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 14
def map
  self
end
or_else(&block) click to toggle source
# File lib/re_sorcery/maybe/nothing.rb, line 18
def or_else(&block)
  ArgCheck['block', block.call, Just, Nothing]
end