Class: TransactionQL::Any

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#expressionsObject (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

Returns:

  • (Boolean)


47
48
49
# File 'lib/transaction_ql/expressions.rb', line 47

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