phlex
phlex copied to clipboard
Raise when overriding HTML elements
Phlex could issue a warning or raise whenever an element method is overridden in a subclass. The warning could be ignored explicitly with a macro, e.g.
override def title
@post.title
end
I think this might make sense as a feature you can optionally enable.
Implementation with a TracePoint.
We could ship a 1.x version that doesn't break.
I don’t love the idea of using a TracePoint to implement this, which we need to support the override def foo interface, since the definition will happen before override is called.
I’m just going to close this for now. If it comes up again, we can take another look.