Class: SyntaxTree::RBrace
Overview
RBrace represents the use of a right brace, i.e., +++.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- String
-
the right brace.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(value:, location:) ⇒ RBrace
constructor
A new instance of RBrace.
Methods inherited from Node
#format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ RBrace
Returns a new instance of RBrace.
6526 6527 6528 6529 |
# File 'lib/syntax_tree/node.rb', line 6526 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the right brace
6524 6525 6526 |
# File 'lib/syntax_tree/node.rb', line 6524 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
6531 6532 6533 |
# File 'lib/syntax_tree/node.rb', line 6531 def accept(visitor) visitor.visit_rbrace(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
6535 6536 6537 |
# File 'lib/syntax_tree/node.rb', line 6535 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
6541 6542 6543 |
# File 'lib/syntax_tree/node.rb', line 6541 def deconstruct_keys(keys) { value: value, location: location } end |