class RuboCop::AST::IndexNode
if user ‘AST::Builder.modernize` or `AST::Builder.emit_index=true`
The main RuboCop runs in legacy mode; this node is only used
(sym :bar))
(send nil :foo) :[]
(send
$ ruby-parse –legacy -e “foo”
(sym :bar))
(send nil :foo)
(index
$ ruby-parse -e “foo”
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
-
(Array
- the arguments of the dispatched method)
def first_argument_index 1 end
def method_name
def method_name :[] end