Class: Maps::TreeNode

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rookout/processor/paths/canopy/maps.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, offset, elements = []) ⇒ TreeNode

Returns a new instance of TreeNode.



9
10
11
12
13
# File 'lib/rookout/processor/paths/canopy/maps.rb', line 9

def initialize(text, offset, elements = [])
  @text = text
  @offset = offset
  @elements = elements
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



7
8
9
# File 'lib/rookout/processor/paths/canopy/maps.rb', line 7

def elements
  @elements
end

#offsetObject (readonly)

Returns the value of attribute offset.



7
8
9
# File 'lib/rookout/processor/paths/canopy/maps.rb', line 7

def offset
  @offset
end

#textObject (readonly)

Returns the value of attribute text.



7
8
9
# File 'lib/rookout/processor/paths/canopy/maps.rb', line 7

def text
  @text
end

Instance Method Details

#each(&block) ⇒ Object



15
16
17
# File 'lib/rookout/processor/paths/canopy/maps.rb', line 15

def each(&block)
  @elements.each(&block)
end