style: enable Style/RedundantSelf rubocop

This commit is contained in:
Gonzalo Rodriguez 2019-03-01 21:15:50 -03:00
parent a0259fb14a
commit 92bc56b7b7
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1
2 changed files with 7 additions and 4 deletions

View file

@ -56,5 +56,8 @@ Style/RedundantBegin:
Style/RedundantFreeze:
Enabled: true
Style/RedundantSelf:
Enabled: true
Style/SingleLineMethods:
Enabled: true

View file

@ -33,7 +33,7 @@ class Rack::Attack
safelist = Safelist.new(name, block)
if name
self.safelists[name] = safelist
safelists[name] = safelist
else
anonymous_safelists << safelist
end
@ -43,7 +43,7 @@ class Rack::Attack
blocklist = Blocklist.new(name, block)
if name
self.blocklists[name] = blocklist
blocklists[name] = blocklist
else
anonymous_blocklists << blocklist
end
@ -60,11 +60,11 @@ class Rack::Attack
end
def throttle(name, options, &block)
self.throttles[name] = Throttle.new(name, options, block)
throttles[name] = Throttle.new(name, options, block)
end
def track(name, options = {}, &block)
self.tracks[name] = Track.new(name, options, block)
tracks[name] = Track.new(name, options, block)
end
def safelists;