Class: Aspen::AST::Nodes::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/aspen/ast/nodes/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, label: nil) ⇒ Node

Returns a new instance of Node.



8
9
10
11
# File 'lib/aspen/ast/nodes/node.rb', line 8

def initialize(attribute: , label: nil)
  @attribute = Aspen::AST::Nodes::Attribute.new(attribute)
  @label     = Aspen::AST::Nodes::Label.new(label)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



6
7
8
# File 'lib/aspen/ast/nodes/node.rb', line 6

def attribute
  @attribute
end

#labelObject

Returns the value of attribute label.



6
7
8
# File 'lib/aspen/ast/nodes/node.rb', line 6

def label
  @label
end