class RuboCop::AST::IndexasgnNode
if user ‘AST::Builder.modernize` or `AST::Builder.emit_index=true`
The main RuboCop runs in legacy mode; this node is only used
(sym :baz))
(sym :bar)
(send nil :foo) :[]=
(send
$ ruby-parse –legacy -e “foo = :baz”
(sym :baz))
(sym :bar)
(send nil :foo)
(indexasgn
$ ruby-parse -e “foo = :baz”
Not as thoroughly tested as legacy equivalent
Used for modern support only!
def arguments
-
(Array
- the arguments of the dispatched method)
def arguments node_parts[1..-1] end
def assignment_method?
def assignment_method? true end
def attribute_accessor?
def attribute_accessor? false end
def method_name
def method_name :[]= end