ruby on rails - Override method with an empty one -
What is the emptify method in Ruby? That is, in one sub-class, if I want to override a method with some method, then there is another syntax from this: I would like to know if there is such a keyword ... ... because this code is clear for maintenance. It is not, and it really does However you can easily add this method to Or you can add it to an object if you are going to use it in more places.
class Adx xx [..a few ..] End and class B & LT; A def xx # dot notthing and end
class B & lt; A void_method: XX termination
def xx There will be more keystrokes;
class A def self.void_method name define_method (name) {} end end
Comments
Post a Comment