Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSL on a module #31

Open
petrachi opened this issue Jan 15, 2015 · 0 comments
Open

DSL on a module #31

petrachi opened this issue Jan 15, 2015 · 0 comments

Comments

@petrachi
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant