Class: Text
Instance Attribute Summary
Attributes inherited from Node
#tmp
Instance Method Summary
collapse
Methods inherited from Node
#add_on_tree, #depth, #id, #id=
Constructor Details
#initialize(depth, text) ⇒ Text
Returns a new instance of Text.
93
94
95
96
|
# File 'lib/rdnode.rb', line 93
def initialize(depth, text)
super(depth)
@text = text
end
|
Instance Method Details
#to_csv ⇒ Object
102
103
104
|
# File 'lib/rdnode.rb', line 102
def to_csv
@text
end
|
#to_desc ⇒ Object
106
107
108
|
# File 'lib/rdnode.rb', line 106
def to_desc
@text
end
|
#to_rd ⇒ Object
110
111
112
|
# File 'lib/rdnode.rb', line 110
def to_rd
"#{dashes(depth)} #{@text}"
end
|
#to_s ⇒ Object
98
99
100
|
# File 'lib/rdnode.rb', line 98
def to_s
"(Text depth:#{depth}, text:#{@text}, tmp:#{@tmp})"
end
|