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