style: enable Style/RaiseArgs rubocop

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

View file

@ -50,6 +50,9 @@ Style/FrozenStringLiteralComment:
Style/HashSyntax:
Enabled: true
Style/RaiseArgs:
Enabled: true
Style/RedundantBegin:
Enabled: true

View file

@ -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