Class: Bade::TagNode
Instance Attribute Summary collapse
Attributes inherited from Node
#childrens, #data, #escaped, #lineno, #parent, #type
Instance Method Summary collapse
- #<<(node) ⇒ Object
-
#initialize(*args) ⇒ TagNode
constructor
A new instance of TagNode.
Methods inherited from Node
create, register_type, registered_types
Constructor Details
#initialize(*args) ⇒ TagNode
Returns a new instance of TagNode.
12 13 14 15 16 |
# File 'lib/bade/node/tag_node.rb', line 12 def initialize(*args) super(*args) @attributes = [] end |
Instance Attribute Details
#attributes ⇒ Array<TagAttributeNode> (readonly)
10 11 12 |
# File 'lib/bade/node/tag_node.rb', line 10 def attributes @attributes end |
Instance Method Details
#<<(node) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/bade/node/tag_node.rb', line 20 def << (node) if node.type == :tag_attribute node.parent = self @attributes << node else super end end |