Module: Saxon::XDM::ItemSequenceLike

Included in:
Array, AtomicValue, ExternalObject, FunctionItem, Map, Node
Defined in:
lib/saxon/xdm/sequence_like.rb

Overview

Mixin for objects that are Sequence-like but only contain a single item, like AtomicValue or Node

Instance Method Summary collapse

Instance Method Details

#sequence_enumObject

return a single-item Enumerator containing self



35
36
37
# File 'lib/saxon/xdm/sequence_like.rb', line 35

def sequence_enum
  [self].to_enum
end

#sequence_sizeObject

Returns the sequence size, which will always be 1.



40
41
42
# File 'lib/saxon/xdm/sequence_like.rb', line 40

def sequence_size
  1
end