Class: TransactionQL::Any
- Inherits:
-
Expression
- Object
- Expression
- TransactionQL::Any
- 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) ⇒ Any
constructor
A new instance of Any.
- #matches?(hash) ⇒ Boolean
Constructor Details
#initialize(expressions) ⇒ Any
Returns a new instance of Any.
43 44 45 |
# File 'lib/transaction_ql/expressions.rb', line 43 def initialize(expressions) @expressions = expressions end |
Instance Attribute Details
#expressions ⇒ Object (readonly)
Returns the value of attribute expressions.
42 43 44 |
# File 'lib/transaction_ql/expressions.rb', line 42 def expressions @expressions end |
Instance Method Details
#matches?(hash) ⇒ Boolean
47 48 49 |
# File 'lib/transaction_ql/expressions.rb', line 47 def matches?(hash) @expressions.map { |exp| exp.matches? hash }.any? end |