phlex
phlex copied to clipboard
Make Phlex::HTML functionality come from a Module
I have a project that has an HTML component that inherits from one of my domain models. I'd like to be able to write that class using Phlex, but Phlex forces me to inherit from Phlex::HTML. I wonder if it's possible to move all the behavior of the Phlex::HTML class into a separate module and then include that module in the class. The result of this would be no behavior change, but more flexibility for dealing with already established inheritance hierarchies.
What do you think about this? I'd be glad to contribute by doing it myself if you find it to be a good idea
I agree we should do this. We should also separate out a Renderable interface from the SGML interface.
As long as we keep Phlex::HTML and Phlex::SVG as classes, we should be able to do this without breaking anything.
I'm working on this ATM. I already extracted the Renderable
interface from SGML
. Any name you'd like me to use when extracting the interface HTML
?
@iachettifederico sorry I haven't given your PR much attention. I will get to it! ❤️