mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
AutoFix RuboCop Style/IfUnlessModifier
This commit is contained in:
parent
65aa4648b2
commit
4ca251f9a8
2 changed files with 1 additions and 9 deletions
|
|
@ -157,12 +157,6 @@ Style/HashSyntax:
|
|||
Exclude:
|
||||
- 'lib/grape_logging/formatters/logstash.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'lib/grape_logging/reporters/logger_reporter.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle, Autocorrect.
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ module Reporters
|
|||
def initialize(logger, formatter, log_level)
|
||||
@logger = logger.clone || Logger.new(STDOUT)
|
||||
@log_level = log_level || :info
|
||||
if @logger.respond_to?(:formatter=)
|
||||
@logger.formatter = formatter || @logger.formatter || GrapeLogging::Formatters::Default.new
|
||||
end
|
||||
@logger.formatter = formatter || @logger.formatter || GrapeLogging::Formatters::Default.new if @logger.respond_to?(:formatter=)
|
||||
end
|
||||
|
||||
def perform(params)
|
||||
|
|
|
|||
Loading…
Reference in a new issue