Rubocop: Style/ParenthesesAroundCondition

- Don't use parentheses around the condition of an if
This commit is contained in:
Pat Hawks 2016-01-04 12:14:00 -08:00
parent cce848d3d8
commit ab3d906e04
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
3 changed files with 3 additions and 3 deletions

View File

@ -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) }

View File

@ -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

View File

@ -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)