Class: Papercraft::ExtensionTagNode

Inherits:
Object
  • Object
show all
Defined in:
lib/papercraft/compiler/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#blockObject (readonly)

Returns the value of attribute block.



174
175
176
# File 'lib/papercraft/compiler/nodes.rb', line 174

def block
  @block
end

#call_nodeObject (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

#locationObject (readonly)

Returns the value of attribute location.



174
175
176
# File 'lib/papercraft/compiler/nodes.rb', line 174

def location
  @location
end

#tagObject (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