Class: TransactionQL::All

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expressions) ⇒ All

Returns a new instance of All.



32
33
34
# File 'lib/transaction_ql/expressions.rb', line 32

def initialize(expressions)
  @expressions = expressions
end

Instance Attribute Details

#expressionsObject (readonly)

Returns the value of attribute expressions.



31
32
33
# File 'lib/transaction_ql/expressions.rb', line 31

def expressions
  @expressions
end

Instance Method Details

#matches?(hash) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/transaction_ql/expressions.rb', line 36

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