Class: RbbCode::TextNode

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

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Node

#<<

Constructor Details

#initialize(parent, text) ⇒ TextNode

Returns a new instance of TextNode.



45
46
47
48
# File 'lib/rbbcode/tree_maker.rb', line 45

def initialize(parent, text)
  @parent = parent
  @text = text
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



50
51
52
# File 'lib/rbbcode/tree_maker.rb', line 50

def text
  @text
end

Instance Method Details

#to_bb_codeObject



52
53
54
# File 'lib/rbbcode/tree_maker.rb', line 52

def to_bb_code
  @text
end