Class: Foxtail::Syntax::Parser::AST::Placeable
- Inherits:
-
SyntaxNode
- Object
- BaseNode
- SyntaxNode
- Foxtail::Syntax::Parser::AST::Placeable
- Defined in:
- lib/foxtail/syntax/parser/ast/placeable.rb
Overview
Represents expressions within braces {} in a pattern that are evaluated at runtime
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
Attributes inherited from SyntaxNode
Attributes inherited from BaseNode
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(expression) ⇒ Placeable
constructor
A new instance of Placeable.
Methods inherited from SyntaxNode
Methods inherited from BaseNode
Constructor Details
#initialize(expression) ⇒ Placeable
Returns a new instance of Placeable.
11 12 13 14 |
# File 'lib/foxtail/syntax/parser/ast/placeable.rb', line 11 def initialize(expression) super() @expression = expression end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
9 10 11 |
# File 'lib/foxtail/syntax/parser/ast/placeable.rb', line 9 def expression @expression end |
Instance Method Details
#children ⇒ Object
16 |
# File 'lib/foxtail/syntax/parser/ast/placeable.rb', line 16 def children = [expression] |