mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-05 00:05:35 -04:00
chore: Fix RuboCop Style/IfInsideElse (#915)
This commit is contained in:
parent
1c0f43b9fd
commit
1fe9763c19
@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2019-03-03 12:56:55 +0100 using RuboCop version 0.65.0.
|
||||
# on 2019-03-04 02:27:02 +0900 using RuboCop version 0.65.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@ -99,11 +99,6 @@ Style/GuardClause:
|
||||
- 'lib/faraday/request/url_encoded.rb'
|
||||
- 'lib/faraday/utils/headers.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Style/IfInsideElse:
|
||||
Exclude:
|
||||
- 'spec/support/helper_methods.rb'
|
||||
|
||||
# Offense count: 24
|
||||
# Cop supports --auto-correct.
|
||||
Style/IfUnlessModifier:
|
||||
|
@ -14,8 +14,8 @@ module Faraday
|
||||
def on_feature(name, &block)
|
||||
if @features.nil?
|
||||
superclass.on_feature(name, &block) if superclass.respond_to?(:on_feature)
|
||||
else
|
||||
yield if block_given? && @features.include?(name)
|
||||
elsif block_given? && @features.include?(name)
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user