Class: Foxtail::Syntax::Parser::AST::Attribute
- Inherits:
-
SyntaxNode
- Object
- BaseNode
- SyntaxNode
- Foxtail::Syntax::Parser::AST::Attribute
- Defined in:
- lib/foxtail/syntax/parser/ast/attribute.rb
Overview
Represents attributes of messages and terms (e.g., .attr = value)
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from SyntaxNode
Attributes inherited from BaseNode
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(id, value) ⇒ Attribute
constructor
A new instance of Attribute.
Methods inherited from SyntaxNode
Methods inherited from BaseNode
Constructor Details
#initialize(id, value) ⇒ Attribute
Returns a new instance of Attribute.
12 13 14 15 16 |
# File 'lib/foxtail/syntax/parser/ast/attribute.rb', line 12 def initialize(id, value) super() @id = id @value = value end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/foxtail/syntax/parser/ast/attribute.rb', line 9 def id @id end |
#value ⇒ Object
Returns the value of attribute value.
10 11 12 |
# File 'lib/foxtail/syntax/parser/ast/attribute.rb', line 10 def value @value end |
Instance Method Details
#children ⇒ Object
18 |
# File 'lib/foxtail/syntax/parser/ast/attribute.rb', line 18 def children = [id, value] |