class Axiom::Function::Predicate::Exclusion

A predicate representing an exclusion test

Public Class Methods

call(left, right) click to toggle source

Test an enumerable to see if a value is excluded

@example

Exclusion.call(1, [1, 2, 3])  # => false

@param [Object] left

the object to test for in the Enumerable

@param [Enumerable] right

the enumerable to test

@return [Boolean]

@api public

# File lib/axiom/function/predicate/exclusion.rb, line 24
def self.call(left, right)
  !right.public_send(Enumerable.compare_method(right), left)
end
inverse() click to toggle source

Return the inverse predicate class

@example

Exclusion.inverse  # => Inclusion

@return [Class<Inclusion>]

@api public

# File lib/axiom/function/predicate/exclusion.rb, line 36
def self.inverse
  Inclusion
end