Class: Axiom::Function::Predicate::NoMatch

Inherits:
Axiom::Function::Predicate show all
Includes:
Comparable
Defined in:
lib/axiom/function/predicate/no_match.rb

Overview

A predicate representing no regexp match between operands

Defined Under Namespace

Modules: Methods

Instance Attribute Summary

Attributes included from Operation::Binary

#left, #right

Class Method Summary collapse

Methods inherited from Axiom::Function::Predicate

type

Methods included from Binary::Invertible

#inverse

Methods included from Binary

#call, #rename, #type

Methods included from Operation::Binary

#initialize

Methods included from Connective::Conjunction::Methods

#and

Methods included from Aliasable

#inheritable_alias

Methods included from Connective::Disjunction::Methods

#or

Methods included from Connective::Negation::Methods

#not

Methods inherited from Axiom::Function

extract_value, rename_attributes, #type

Methods included from Visitable

#accept

Class Method Details

.call(left, right) ⇒ Boolean

Evaluate the values for no match

Examples:

NoMatch.call(left, right)  # => true or false

Parameters:

  • left (Object)
  • right (Object)

Returns:

  • (Boolean)


46
47
48
# File 'lib/axiom/function/predicate/no_match.rb', line 46

def self.call(left, right)
  left !~ right
end

.inverseClass<Match>

Return the inverse predicate class

Examples:

NoMatch.inverse  # => Match

Returns:



31
32
33
# File 'lib/axiom/function/predicate/no_match.rb', line 31

def self.inverse
  Match
end

.operationSymbol

Return the NoMatch operation

Examples:

NoMatch.operation  # => :!~

Returns:

  • (Symbol)


19
20
21
# File 'lib/axiom/function/predicate/no_match.rb', line 19

def self.operation
  :'!~'
end