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

Please namespace your classes #1

Open
kkuchta opened this issue Aug 6, 2014 · 0 comments
Open

Please namespace your classes #1

kkuchta opened this issue Aug 6, 2014 · 0 comments

Comments

@kkuchta
Copy link

kkuchta commented Aug 6, 2014

Ruby is weird about constants. If your gem defines class Foo and mine defines SomeNameSpace::Foo, yours will get loaded and mine won't. You'll get the nice warning warning: toplevel constant Foo referenced by SomeNameSpace::Foo, and accessing SomeNameSpace::Foo will actually just get Foo.

In this case, I have an existing class Pickups::TimeSlot which conflicts with your top-level TimeSlot class. If you add a namespace to your TimeSlot, though, it should resolve the issue.

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

No branches or pull requests

1 participant