class Nothing

Public Instance Methods

==(object) click to toggle source
# File lib/matilda-maybe/nothing.rb, line 30
def ==(object)
  if object.class == Nothing
    true
  else
    false
  end
end
bind() click to toggle source
# File lib/matilda-maybe/nothing.rb, line 6
def bind
  Nothing.new
end
get(*args, &block) click to toggle source
# File lib/matilda-maybe/nothing.rb, line 22
def get(*args, &block)
  if args.empty?
    block.call
  else
    args.first
  end
end
map() click to toggle source
# File lib/matilda-maybe/nothing.rb, line 10
def map
  Nothing.new
end
method_missing(method_name, *args, &block) click to toggle source
# File lib/matilda-maybe/nothing.rb, line 2
def method_missing(method_name, *args, &block)
  Nothing.new
end
or(*args, &block) click to toggle source
# File lib/matilda-maybe/nothing.rb, line 14
def or(*args, &block)
  if args.empty?
    block.call
  else
    args.first
  end
end