Class: Papercraft::ExtensionTagNode
- Inherits:
-
Object
- Object
- Papercraft::ExtensionTagNode
- Defined in:
- lib/papercraft/compiler/nodes.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#call_node ⇒ Object
readonly
Returns the value of attribute call_node.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(call_node, translator) ⇒ ExtensionTagNode
constructor
A new instance of ExtensionTagNode.
Constructor Details
#initialize(call_node, translator) ⇒ ExtensionTagNode
Returns a new instance of ExtensionTagNode.
176 177 178 179 180 181 |
# File 'lib/papercraft/compiler/nodes.rb', line 176 def initialize(call_node, translator) @call_node = call_node @tag = call_node.name @location = call_node.location @block = call_node.block && translator.visit(call_node.block) end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
174 175 176 |
# File 'lib/papercraft/compiler/nodes.rb', line 174 def block @block end |
#call_node ⇒ Object (readonly)
Returns the value of attribute call_node.
174 175 176 |
# File 'lib/papercraft/compiler/nodes.rb', line 174 def call_node @call_node end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
174 175 176 |
# File 'lib/papercraft/compiler/nodes.rb', line 174 def location @location end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
174 175 176 |
# File 'lib/papercraft/compiler/nodes.rb', line 174 def tag @tag end |
Instance Method Details
#accept(visitor) ⇒ Object
183 184 185 |
# File 'lib/papercraft/compiler/nodes.rb', line 183 def accept(visitor) visitor.visit_extension_tag_node(self) end |