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

Fixed the 'already initialized constant TAG' warning by converting to class level methods #2

Merged
merged 3 commits into from
Oct 12, 2013

Conversation

aforward
Copy link
Contributor

Thanks for the gem! I noticed some warnings about redeclared constants, so I switched them to static methods.

BEFORE CHANGE:

Andrews-MacBook-Pro:docx aforward$ bundle exec irb
irb(main):001:0> require "docx"; Docx::Document
/Users/aforward/tp/projects/docx/lib/docx/elements/bookmark.rb:9: warning: already initialized constant TAG
/Users/aforward/tp/projects/docx/lib/docx/elements/text.rb:6: warning: already initialized constant TAG
/Users/aforward/tp/projects/docx/lib/docx/containers/text_run.rb:16: warning: already initialized constant TAG
/Users/aforward/tp/projects/docx/lib/docx/containers/paragraph.rb:11: warning: already initialized constant TAG
=> Docx::Document

AFTER CHANGE:

Andrews-MacBook-Pro:docx aforward$ bundle exec irb
irb(main):001:0> require "docx"; Docx::Document
=> Docx::Document

@aforward
Copy link
Contributor Author

FYI, all the specs were passing great after this change.

@chrahunt
Copy link
Collaborator

chrahunt commented May 7, 2014

Fixes #8.

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

Successfully merging this pull request may close these issues.

None yet

2 participants