Class: RbbCode::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/rbbcode/tree_maker.rb

Direct Known Subclasses

RootNode, TagNode, TextNode

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ Node

Returns a new instance of Node.



26
27
28
29
# File 'lib/rbbcode/tree_maker.rb', line 26

def initialize(parent)
	@parent = parent
	@children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



24
25
26
# File 'lib/rbbcode/tree_maker.rb', line 24

def children
  @children
end

#parentObject

Returns the value of attribute parent.



31
32
33
# File 'lib/rbbcode/tree_maker.rb', line 31

def parent
  @parent
end

Instance Method Details

#<<(child) ⇒ Object



20
21
22
# File 'lib/rbbcode/tree_maker.rb', line 20

def << (child)
	@children << child
end