class RuboCop::AST::LambdaNode
Used for modern support only: Not as thoroughly tested as legacy equivalent
$ ruby-parse -e "->(foo) { bar }" (block (lambda) (args (arg :foo)) (send nil :bar)) $ ruby-parse --legacy -e "->(foo) { bar }" (block (send nil :lambda) (args (arg :foo)) (send nil :bar))
The main RuboCop
runs in legacy mode; this node is only used if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true`
Public Instance Methods
assignment_method?()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 43 def assignment_method? false end
attribute_accessor?()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 38 def attribute_accessor? false end
lambda?()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 28 def lambda? true end
lambda_literal?()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 33 def lambda_literal? true end
method_name()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 53 def method_name :lambda end
receiver()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 48 def receiver nil end
Private Instance Methods
first_argument_index()
click to toggle source
For similarity with legacy mode
# File lib/rubocop/ast/node/lambda_node.rb, line 60 def first_argument_index 2 end