Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Conversation

@mattcamuto
Copy link

Override dsl node name via mimic method in class hierarchy. With tests and readme updates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would klazz.name be nil? in this case? Is that a legitimate use case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was by design as I had to use an anonymous interstitial class which by design has a nil name. We could identify this use case in others ways (i.e. traverse up ancestors) but that seems kludgy as well. This whole problems i chicken-vs-egg here since the self.inherited hook is called before a class is evaluated. So i would say its use case is legitimate. All the tests will fails if if is not there. And we really should never really be including classes with nil name anyways. I modeled this concept a bit after camping/sequal examples.

Any other ideas (sans writing this to use modules instead of inheritance) would be great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants