Class: AEMReference::LogicalTest

Inherits:
Test
  • Object
show all
Defined in:
lib/_aem/aemreference.rb

Overview

Logical tests

Direct Known Subclasses

AND, NOT, OR

Instance Method Summary collapse

Methods inherited from Test

#and, #not, #or

Methods inherited from Query

#==, #AEM_comparable, #hash, #inspect

Constructor Details

#initialize(operands) ⇒ LogicalTest

Returns a new instance of LogicalTest.



880
881
882
883
# File 'lib/_aem/aemreference.rb', line 880

def initialize(operands)
  super()
  @_operands = operands
end

Instance Method Details

#AEM_pack_self(codecs) ⇒ Object



894
895
896
897
898
899
# File 'lib/_aem/aemreference.rb', line 894

def AEM_pack_self(codecs)
  return AEMReference.pack_list_as(KAE::TypeLogicalDescriptor, [
                                     [KAE::KeyAELogicalOperator, self.class::Operator],
                                     [KAE::KeyAELogicalTerms, codecs.pack(@_operands)]
                                   ])
end

#AEM_resolve(obj) ⇒ Object



890
891
892
# File 'lib/_aem/aemreference.rb', line 890

def AEM_resolve(obj)
  return @_operands[0].AEM_resolve(obj).send(self.class::Name, *@_operands[1, @_operands.length])
end

#to_sObject



885
886
887
888
# File 'lib/_aem/aemreference.rb', line 885

def to_s
  op_str = (@_operands[1, @_operands.length].collect { |o| o.inspect }).join(', ')
  return "#{@_operands[0].inspect}.#{self.class::Name}(#{op_str})"
end