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
rubocop: lib/jekyll/collection.rb #5022
Conversation
@parkr any thoughts about this PR? 😄 |
else | ||
Jekyll.logger.debug "Skipped From Publishing:", doc.relative_path | ||
end | ||
read_docs(full_path) |
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.
In this case, you're just reading one document. Thus, this should be singular: read_document(full_path)
.
Two naming nits. Otherwise, LGTM. |
@jekyll/core, could one of you take a look at this and give it a LGTM? |
|
||
private | ||
def read_docs(full_path) | ||
doc = Jekyll::Document.new(full_path, { :site => site, :collection => 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.
doc = Document.new(full_path, {
:site => site, :collection => self
})
doc.read
if site.publisher.publish?(doc) || !write?
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.
You don't like the 1-line solution there? I think it reads nicely. We could even remove the curly braces:
doc = Document.new(full_path, :site => site, :collection => 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.
I do like the version you've given @parkr.
Just a few comments! Thanks. |
LGTM. @envygeeks? |
LGTM. |
@jekyllbot: merge +dev |
#4885