class Axiom::Function::Predicate::Inclusion
A predicate representing an inclusion test
Public Class Methods
call(left, right)
click to toggle source
Test an enumerable to see if a value is included
@example
Inclusion.call(1, [1, 2, 3]) # => true
@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/inclusion.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
Inclusion.inverse # => Exclusion
@return [Class<Exclusion>]
@api public
# File lib/axiom/function/predicate/inclusion.rb, line 36 def self.inverse Exclusion end