Class: TransactionQL::Not

Inherits:
Expression show all
Defined in:
lib/transaction_ql/expressions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expressions) ⇒ Not

Returns a new instance of Not.



54
55
56
# File 'lib/transaction_ql/expressions.rb', line 54

def initialize(expressions)
  @expressions = expressions
end

Instance Attribute Details

#expressionsObject (readonly)

Returns the value of attribute expressions.



53
54
55
# File 'lib/transaction_ql/expressions.rb', line 53

def expressions
  @expressions
end

Instance Method Details

#matches?(hash) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
61
# File 'lib/transaction_ql/expressions.rb', line 58

def matches?(hash)
  result = @expressions.map { |exp| exp.matches? hash }.any?
  return !(result)
end