Class: SyntaxTree::TLamBeg
Overview
TLamBeg represents the beginning of the body of a lambda literal using braces.
-> { value }
In the example above the TLamBeg represents the { operator.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- String
-
the beginning of the body of the lambda literal.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(_keys) ⇒ Object
-
#initialize(value:, location:) ⇒ TLamBeg
constructor
A new instance of TLamBeg.
Methods inherited from Node
#construct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ TLamBeg
Returns a new instance of TLamBeg.
9001 9002 9003 9004 |
# File 'lib/syntax_tree/node.rb', line 9001 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the beginning of the body of the lambda literal
8999 9000 9001 |
# File 'lib/syntax_tree/node.rb', line 8999 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
9006 9007 9008 |
# File 'lib/syntax_tree/node.rb', line 9006 def accept(visitor) visitor.visit_tlambeg(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
9010 9011 9012 |
# File 'lib/syntax_tree/node.rb', line 9010 def child_nodes [] end |
#deconstruct_keys(_keys) ⇒ Object
9016 9017 9018 |
# File 'lib/syntax_tree/node.rb', line 9016 def deconstruct_keys(_keys) { value: value, location: location } end |