Class: Command::Results::ListEnd

Inherits:
ListItem
  • Object
show all
Defined in:
lib/command-set/result-list.rb

Overview

A sort of virtual list element, used to denote the end of a list in iteration.

Instance Attribute Summary collapse

Attributes inherited from ListItem

#depth, #options, #sequence, #value

Instance Method Summary collapse

Methods inherited from ListItem

#==, #eql?, #filter, #match, #match_on, #tree_order_next

Constructor Details

#initialize(end_of) ⇒ ListEnd

Returns a new instance of ListEnd.



82
83
84
# File 'lib/command-set/result-list.rb', line 82

def initialize(end_of)
  @end_of = end_of
end

Instance Attribute Details

#end_ofObject (readonly)

Returns the value of attribute end_of.



86
87
88
# File 'lib/command-set/result-list.rb', line 86

def end_of
  @end_of
end

Instance Method Details

#inspectObject



104
105
106
# File 'lib/command-set/result-list.rb', line 104

def inspect
  "<e(#{@end_of.order}):#{@end_of.name}>"
end

#next_siblingObject



96
97
98
# File 'lib/command-set/result-list.rb', line 96

def next_sibling
  @end_of.next_sibling
end

#orderObject



92
93
94
# File 'lib/command-set/result-list.rb', line 92

def order
  @end_of.order
end

#parentObject



88
89
90
# File 'lib/command-set/result-list.rb', line 88

def parent
  @end_of.parent
end

#to_sObject



100
101
102
# File 'lib/command-set/result-list.rb', line 100

def to_s
  @end_of.to_s
end