Class: TransactionQL::Not
- Inherits:
-
Expression
- Object
- Expression
- TransactionQL::Not
- Defined in:
- lib/transaction_ql/expressions.rb
Instance Attribute Summary collapse
-
#expressions ⇒ Object
readonly
Returns the value of attribute expressions.
Instance Method Summary collapse
-
#initialize(expressions) ⇒ Not
constructor
A new instance of Not.
- #matches?(hash) ⇒ Boolean
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
#expressions ⇒ Object (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
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 |