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

Refactor namespace Annotate #719

Merged
merged 4 commits into from
Jan 16, 2020
Merged

Conversation

nard-tech
Copy link
Collaborator

Summary

  • Remove redundant Annotate.loaded_tasks= and Annotate.loaded_tasks
  • Remove unnecessary comment for Rubocop
  • Make Annotate.load_requires private
  • Refactor Annotate.load_tasks

Copy link
Collaborator

@drwl drwl left a 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
Copy link
Collaborator

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

Copy link
Collaborator Author

@nard-tech nard-tech Jan 15, 2020

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

Copy link
Collaborator

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

@drwl drwl added the reviewed label Jan 15, 2020
@drwl drwl merged commit 7248d79 into ctran:develop Jan 16, 2020
@nard-tech nard-tech deleted the feature/refactor_annotate branch January 20, 2020 11:39
vfonic pushed a commit to vfonic/annotate_models that referenced this pull request May 8, 2020
* Remove Annotate.#loaded_tasks= and .loaded_tasks

* Remove unnecessary comment for Rubocop

* Make Annotate.load_requires private

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

Successfully merging this pull request may close these issues.

2 participants