mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
style: enable Style/RaiseArgs rubocop
This commit is contained in:
parent
92bc56b7b7
commit
2240e8f2c6
2 changed files with 4 additions and 1 deletions
|
|
@ -50,6 +50,9 @@ Style/FrozenStringLiteralComment:
|
|||
Style/HashSyntax:
|
||||
Enabled: true
|
||||
|
||||
Style/RaiseArgs:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantBegin:
|
||||
Enabled: true
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ module Rack
|
|||
def initialize(name, options, block)
|
||||
@name, @block = name, block
|
||||
MANDATORY_OPTIONS.each do |opt|
|
||||
raise ArgumentError.new("Must pass #{opt.inspect} option") unless options[opt]
|
||||
raise ArgumentError, "Must pass #{opt.inspect} option" unless options[opt]
|
||||
end
|
||||
@limit = options[:limit]
|
||||
@period = options[:period].respond_to?(:call) ? options[:period] : options[:period].to_i
|
||||
|
|
|
|||
Loading…
Reference in a new issue