mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-26 14:57:47 +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:
|
Style/RedundantFreeze:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/RedundantSelf:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/SingleLineMethods:
|
Style/SingleLineMethods:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Rack::Attack
|
||||||
safelist = Safelist.new(name, block)
|
safelist = Safelist.new(name, block)
|
||||||
|
|
||||||
if name
|
if name
|
||||||
self.safelists[name] = safelist
|
safelists[name] = safelist
|
||||||
else
|
else
|
||||||
anonymous_safelists << safelist
|
anonymous_safelists << safelist
|
||||||
end
|
end
|
||||||
|
|
@ -43,7 +43,7 @@ class Rack::Attack
|
||||||
blocklist = Blocklist.new(name, block)
|
blocklist = Blocklist.new(name, block)
|
||||||
|
|
||||||
if name
|
if name
|
||||||
self.blocklists[name] = blocklist
|
blocklists[name] = blocklist
|
||||||
else
|
else
|
||||||
anonymous_blocklists << blocklist
|
anonymous_blocklists << blocklist
|
||||||
end
|
end
|
||||||
|
|
@ -60,11 +60,11 @@ class Rack::Attack
|
||||||
end
|
end
|
||||||
|
|
||||||
def throttle(name, options, &block)
|
def throttle(name, options, &block)
|
||||||
self.throttles[name] = Throttle.new(name, options, block)
|
throttles[name] = Throttle.new(name, options, block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def track(name, options = {}, &block)
|
def track(name, options = {}, &block)
|
||||||
self.tracks[name] = Track.new(name, options, block)
|
tracks[name] = Track.new(name, options, block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def safelists;
|
def safelists;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue