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
#construct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ RBrace
Returns a new instance of RBrace.
7321 7322 7323 7324 |
# File 'lib/syntax_tree/node.rb', line 7321 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the right brace
7319 7320 7321 |
# File 'lib/syntax_tree/node.rb', line 7319 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
7326 7327 7328 |
# File 'lib/syntax_tree/node.rb', line 7326 def accept(visitor) visitor.visit_rbrace(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
7330 7331 7332 |
# File 'lib/syntax_tree/node.rb', line 7330 def child_nodes [] end |
#deconstruct_keys(_keys) ⇒ Object
7336 7337 7338 |
# File 'lib/syntax_tree/node.rb', line 7336 def deconstruct_keys(_keys) { value: value, location: location } end |