Method: Ruby2Ruby#rewrite_attrasgn

Defined in:
lib/ruby2ruby.rb

#rewrite_attrasgn(exp) ⇒ Object

Rewriters:



958
959
960
961
962
963
964
965
# File 'lib/ruby2ruby.rb', line 958

def rewrite_attrasgn exp # :nodoc:
  if context.first(2) == [:array, :masgn] then
    exp[0] = :call
    exp[2] = exp[2].to_s.sub(/=$/, '').to_sym
  end

  exp
end