mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
style: enable Style/RedundantSelf rubocop
This commit is contained in:
parent
a0259fb14a
commit
92bc56b7b7
2 changed files with 7 additions and 4 deletions
|
|
@ -56,5 +56,8 @@ Style/RedundantBegin:
|
|||
Style/RedundantFreeze:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantSelf:
|
||||
Enabled: true
|
||||
|
||||
Style/SingleLineMethods:
|
||||
Enabled: true
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue