A
Alexander Ponomarchuk
Hi!
class BaseClass
def BaseClass.initialization_for_derived_class
@var = do_something
end
end
class DerivedClass < BaseClass
end
I'd like to initialize @var in DerivedClass. Is there some way to run
initialization_for_derived_class when inheriting BaseClass?
class BaseClass
def BaseClass.initialization_for_derived_class
@var = do_something
end
end
class DerivedClass < BaseClass
end
I'd like to initialize @var in DerivedClass. Is there some way to run
initialization_for_derived_class when inheriting BaseClass?