I have a use case where I have class A
which includes module B
.
class A
include B
def do_one_thing
# override module's method. do something different instead
end
def do_another_thing
# Call `do_one_thing` from here,
# but call the module's method, not the one I overrode above.
end
end
module B
included do
def do_one_thing
# ...
end
end
# some other methods
end
As shown above, I'm calling do_one_thing
from do_another_thing
. My problem is that I need to call the module's method (i.e. the super
method). Is this possible in Rails?