class Fear::EmptyPartialFunction

Use singleton version of EmptyPartialFunction – PartialFunction::EMPTY @api private

Public Instance Methods

===(arg)
Alias for: call
[](arg)
Alias for: call
and_then(*) click to toggle source
# File lib/fear/empty_partial_function.rb, line 28
def and_then(*)
  self
end
call(arg) click to toggle source
# File lib/fear/empty_partial_function.rb, line 13
def call(arg)
  raise MatchError, "partial function not defined at: #{arg}"
end
Also aliased as: ===, []
call_or_else(arg) { |arg| ... } click to toggle source
# File lib/fear/empty_partial_function.rb, line 20
def call_or_else(arg)
  yield arg
end
defined_at?(_) click to toggle source
# File lib/fear/empty_partial_function.rb, line 9
def defined_at?(_)
  false
end
or_else(other) click to toggle source
# File lib/fear/empty_partial_function.rb, line 24
def or_else(other)
  other
end
to_s() click to toggle source
# File lib/fear/empty_partial_function.rb, line 32
def to_s
  "Empty partial function"
end