mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
AutoFix RuboCop Style/Lambda
This commit is contained in:
parent
a95640b31b
commit
65aa4648b2
3 changed files with 2 additions and 11 deletions
|
|
@ -163,15 +163,6 @@ Style/IfUnlessModifier:
|
|||
Exclude:
|
||||
- 'lib/grape_logging/reporters/logger_reporter.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: line_count_dependent, lambda, literal
|
||||
Style/Lambda:
|
||||
Exclude:
|
||||
- 'lib/grape_logging/util/parameter_filter.rb'
|
||||
- 'spec/lib/grape_logging/loggers/filter_parameters_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle, Autocorrect.
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ else
|
|||
|
||||
class CompiledFilter # :nodoc:
|
||||
def self.compile(replacement, filters)
|
||||
return lambda { |params| params.dup } if filters.empty?
|
||||
return ->(params) { params.dup } if filters.empty?
|
||||
|
||||
strings = []
|
||||
regexps = []
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ describe GrapeLogging::Loggers::FilterParameters do
|
|||
end
|
||||
|
||||
let(:mock_request_with_deep_nesting) do
|
||||
deep_clone = lambda { Marshal.load Marshal.dump mock_request.params }
|
||||
deep_clone = -> { Marshal.load Marshal.dump mock_request.params }
|
||||
OpenStruct.new(
|
||||
params: deep_clone.call.merge(
|
||||
'five' => deep_clone.call.merge(
|
||||
|
|
|
|||
Loading…
Reference in a new issue