You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, DSL doesn't work completely with module.
Because we define many singleton methods, that aren't inherited when module is included.
In order to clean that, we should define a specific module in wich we inject all class methods we need. Then, we extend this module in the "domain".
If the "domain" is a Module, we extend the same module in every class that include the module ObjectSpace.each_object(Class).select{|x| x <=> domain }, and override the 'included/prepended' to add the module to extend.
The text was updated successfully, but these errors were encountered:
Today, DSL doesn't work completely with module.
Because we define many singleton methods, that aren't inherited when module is included.
In order to clean that, we should define a specific module in wich we inject all class methods we need. Then, we extend this module in the "domain".
If the "domain" is a Module, we extend the same module in every class that include the module
ObjectSpace.each_object(Class).select{|x| x <=> domain }
, and override the 'included/prepended' to add the module to extend.The text was updated successfully, but these errors were encountered: