Class: Rux::AST::TagNode
- Inherits:
-
Object
- Object
- Rux::AST::TagNode
- Defined in:
- lib/rux/ast/tag_node.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(name, attrs) ⇒ TagNode
constructor
A new instance of TagNode.
Constructor Details
#initialize(name, attrs) ⇒ TagNode
Returns a new instance of TagNode.
6 7 8 9 10 |
# File 'lib/rux/ast/tag_node.rb', line 6 def initialize(name, attrs) @name = name @attrs = attrs @children = [] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
4 5 6 |
# File 'lib/rux/ast/tag_node.rb', line 4 def attrs @attrs end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
4 5 6 |
# File 'lib/rux/ast/tag_node.rb', line 4 def children @children end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/rux/ast/tag_node.rb', line 4 def name @name end |
Instance Method Details
#accept(visitor) ⇒ Object
12 13 14 |
# File 'lib/rux/ast/tag_node.rb', line 12 def accept(visitor) visitor.visit_tag(self) end |