class RuboCop::AST::LambdaNode
if user ‘AST::Builder.modernize` or `AST::Builder.emit_lambda=true`
The main RuboCop runs in legacy mode; this node is only used
(send nil :bar))
(arg :foo))
(args
(send nil :lambda)
(block
$ ruby-parse –legacy -e “->(foo) { bar }”
(send nil :bar))
(arg :foo))
(args
(lambda)
(block
$ ruby-parse -e “->(foo) { bar }”
Not as thoroughly tested as legacy equivalent
Used for modern support only:
def assignment_method?
def assignment_method? false end
def attribute_accessor?
def attribute_accessor? false end
def first_argument_index
def first_argument_index 2 end
def lambda?
def lambda? true end
def lambda_literal?
def lambda_literal? true end
def method_name
def method_name :lambda end
def receiver
def receiver nil end