-
Notifications
You must be signed in to change notification settings - Fork 609
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
Refactor namespace Annotate #719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a question
@@ -136,4 +131,13 @@ def self.bootstrap_rake | |||
load_tasks | |||
Rake::Task[:set_annotation_options].invoke | |||
end | |||
|
|||
class << self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems interesting, I'm not sure I've seen this before. Could you explain what is supposed to be happening?
Seems like a module that has class-level methods. But I'm confused as to what happens when doing the
class << self
...
end
in a module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drwl when you want to defined private method, you can write like this.
cf. https://stackoverflow.com/questions/4952980/how-to-create-a-private-class-method/12311586#12311586
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks for the link
* Remove Annotate.#loaded_tasks= and .loaded_tasks * Remove unnecessary comment for Rubocop * Make Annotate.load_requires private * Refactor Annotate.load_tasks
Summary
Annotate.loaded_tasks=
andAnnotate.loaded_tasks
Annotate.load_tasks