mutest icon indicating copy to clipboard operation
mutest copied to clipboard

Mutate `Constant.foo` to `self.class.foo`

Open backus opened this issue 8 years ago • 0 comments
trafficstars

Useful for code like

class User
  def blah
    User.recent.first(5)
  end
end

in this case the instance method #blah doesn't need to repeat its class name and could instead specify self.class.recent.first(5)

backus avatar Apr 23 '17 03:04 backus