mutest
mutest copied to clipboard
Mutate `Constant.foo` to `self.class.foo`
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)