Class: Aspen::AST::Nodes::Attribute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Attribute

Returns a new instance of Attribute.



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

def initialize(content)
  @content = Aspen::AST::Nodes::Content.new(content)
  @type    = Aspen::AST::Nodes::Type.determine(content)
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end