class SyntaxTree::TLambda
TLambda
represents the beginning of a lambda literal.
-> { value }
In
the example above the TLambda
represents the ->
operator.
Attributes
- String
-
the beginning of the lambda literal
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 10760 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 10786 def ===(other) other.is_a?(TLambda) && value === other.value end
Source
# File lib/syntax_tree/node.rb, line 10765 def accept(visitor) visitor.visit_tlambda(self) end
Source
# File lib/syntax_tree/node.rb, line 10769 def child_nodes [] end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 10773 def copy(value: nil, location: nil) TLambda.new( value: value || self.value, location: location || self.location ) end
Source
# File lib/syntax_tree/node.rb, line 10782 def deconstruct_keys(_keys) { value: value, location: location } end