Class: AEMReference::ElementByOrdinal

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

Constant Summary collapse

KeyForm =

Syntax: elements_ref.first / elements_ref.middle / elements_ref.last / elements_ref.any

AEMReference.pack_enum(KAE::FormAbsolutePosition)

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 SingleElement

#_pack_key

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, #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, keyname) ⇒ ElementByOrdinal

Returns a new instance of ElementByOrdinal.



444
445
446
447
# File 'lib/_aem/aemreference.rb', line 444

def initialize(wantcode, container, key, keyname)
  @_keyname = keyname
  super(wantcode, container, key)
end

Instance Method Details

#AEM_resolve(obj) ⇒ Object



453
454
455
# File 'lib/_aem/aemreference.rb', line 453

def AEM_resolve(obj)
  return @_container.AEM_resolve(obj).send(@_keyname)
end

#to_sObject



449
450
451
# File 'lib/_aem/aemreference.rb', line 449

def to_s
  return "#{@_container}.#{@_keyname}"
end