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