You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now you need to define self.prepended method and use the class passed as a parameter to override all class methods. It would be great to automatically use all methods defined in a nested module called ClassMethods to override class ones:
module Animals::Dog::AddGenus
module ClassMethods
def genus
'canis'
end
end
end
Animals::Dog.genus #=> 'canis'
The text was updated successfully, but these errors were encountered:
Right now you need to define
self.prepended
method and use the class passed as a parameter to override all class methods. It would be great to automatically use all methods defined in a nested module calledClassMethods
to override class ones:The text was updated successfully, but these errors were encountered: