Class: SyntaxTree::TLambda
Overview
TLambda represents the beginning of a lambda literal.
-> { value }
In the example above the TLambda represents the ->
operator.
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the beginning of the lambda literal.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ TLambda
constructor
A new instance of TLambda.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ TLambda
Returns a new instance of TLambda.
10114 10115 10116 10117 |
# File 'lib/syntax_tree/node.rb', line 10114 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
10112 10113 10114 |
# File 'lib/syntax_tree/node.rb', line 10112 def location @location end |
#value ⇒ Object (readonly)
- String
-
the beginning of the lambda literal
10109 10110 10111 |
# File 'lib/syntax_tree/node.rb', line 10109 def value @value end |