Class: AEMReference::SingleElement

Inherits:
PositionSpecifier show all
Defined in:
lib/_aem/aemreference.rb

Overview

Single elements

Constant Summary

Constants inherited from PositionSpecifier

PositionSpecifier::After, PositionSpecifier::Before, PositionSpecifier::Beginning, PositionSpecifier::End, PositionSpecifier::Next, PositionSpecifier::Previous

Instance Attribute Summary

Attributes inherited from PositionSpecifier

#AEM_want

Instance Method Summary collapse

Methods inherited from PositionSpecifier

#_pack_self, #after, #before, #beginning, #begins_with, #contains, #elements, #end, #ends_with, #eq, #ge, #gt, #is_in, #le, #lt, #ne, #next, #previous, #property, #to_s, #user_property

Methods inherited from Specifier

#AEM_pack_self, #AEM_root, #AEM_set_desc, #AEM_true_self

Methods inherited from Query

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

Constructor Details

#initialize(wantcode, container, key) ⇒ SingleElement

Base class for all single element specifiers.



388
389
390
# File 'lib/_aem/aemreference.rb', line 388

def initialize(wantcode, container, key)
  super(wantcode, container.AEM_true_self, key)
end

Instance Method Details

#_pack_key(codecs) ⇒ Object



392
393
394
# File 'lib/_aem/aemreference.rb', line 392

def _pack_key(codecs)
  return codecs.pack(@_key)
end

#AEM_resolve(obj) ⇒ Object



396
397
398
# File 'lib/_aem/aemreference.rb', line 396

def AEM_resolve(obj)
  return @_container.AEM_resolve(obj).send(self.class::By, @_key)
end