Rubocop: Style/ParenthesesAroundCondition
- Don't use parentheses around the condition of an if
This commit is contained in:
parent
cce848d3d8
commit
ab3d906e04
|
@ -76,7 +76,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns an Array of plugin search paths
|
# Returns an Array of plugin search paths
|
||||||
def plugins_path
|
def plugins_path
|
||||||
if (site.config['plugins_dir'] == Jekyll::Configuration::DEFAULTS['plugins_dir'])
|
if site.config['plugins_dir'] == Jekyll::Configuration::DEFAULTS['plugins_dir']
|
||||||
[site.in_source_dir(site.config['plugins_dir'])]
|
[site.in_source_dir(site.config['plugins_dir'])]
|
||||||
else
|
else
|
||||||
Array(site.config['plugins_dir']).map { |d| File.expand_path(d) }
|
Array(site.config['plugins_dir']).map { |d| File.expand_path(d) }
|
||||||
|
|
|
@ -115,7 +115,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
def add_dependency(path, dependency)
|
def add_dependency(path, dependency)
|
||||||
return if (metadata[path].nil? || @disabled)
|
return if metadata[path].nil? || @disabled
|
||||||
|
|
||||||
unless metadata[path]["deps"].include? dependency
|
unless metadata[path]["deps"].include? dependency
|
||||||
metadata[path]["deps"] << dependency
|
metadata[path]["deps"] << dependency
|
||||||
|
|
|
@ -62,7 +62,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def value_from_singular_key(hash, key)
|
def value_from_singular_key(hash, key)
|
||||||
hash[key] if (hash.key?(key) || (hash.default_proc && hash[key]))
|
hash[key] if hash.key?(key) || (hash.default_proc && hash[key])
|
||||||
end
|
end
|
||||||
|
|
||||||
def value_from_plural_key(hash, key)
|
def value_from_plural_key(hash, key)
|
||||||
|
|
Loading…
Reference in New Issue