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?

For similarity with legacy mode
def assignment_method?
  false
end

def attribute_accessor?

For similarity with legacy mode
def attribute_accessor?
  false
end

def first_argument_index

For similarity with legacy mode
def first_argument_index
  2
end

def lambda?

For similarity with legacy mode
def lambda?
  true
end

def lambda_literal?

For similarity with legacy mode
def lambda_literal?
  true
end

def method_name

For similarity with legacy mode
def method_name
  :lambda
end

def receiver

For similarity with legacy mode
def receiver
  nil
end