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