Open
Description
This is a pretty common use case (for me at least). I define a base class:
class Base
# ...
Contract String => String
def foo(arg)
# ...
end
# ...
end
Next I write a bunch of subclasses from Base
. I might write a bunch of new methods on these subclasses, but sometimes I also need to overwrite the definition of a function.
class A < Base
# ...
def foo(arg)
# New stuff.
end
# ...
end
By default it would be ideal for the contract of Base#foo
to be given to A#foo
, allowing a new contract to overwrite the inherited one if needed.