Class: Tag
Instance Attribute Summary collapse
Attributes inherited from Node
#tmp
Instance Method Summary
collapse
Methods inherited from Node
#add_on_tree, #depth, #id, #id=
Constructor Details
#initialize(depth, tag, text) ⇒ Tag
Returns a new instance of Tag.
67
68
69
70
71
|
# File 'lib/rdnode.rb', line 67
def initialize(depth, tag, text)
super(depth)
@tag = tag
@text = text
end
|
Instance Attribute Details
#tag ⇒ Object
Returns the value of attribute tag.
72
73
74
|
# File 'lib/rdnode.rb', line 72
def tag
@tag
end
|
Instance Method Details
#to_csv ⇒ Object
78
79
80
|
# File 'lib/rdnode.rb', line 78
def to_csv
@text
end
|
#to_desc ⇒ Object
82
83
84
|
# File 'lib/rdnode.rb', line 82
def to_desc
@text
end
|
#to_rd ⇒ Object
86
87
88
|
# File 'lib/rdnode.rb', line 86
def to_rd
"#{dashes(depth)} [[#{@tag}:#{@text}]]"
end
|
#to_s ⇒ Object
74
75
76
|
# File 'lib/rdnode.rb', line 74
def to_s
"(Tag depth:#{depth}, tag:#{@tag}, text:#{@text}, tmp:#{@tmp})"
end
|