File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,6 @@ Style/DoubleNegation:
74
74
- ' lib/grape/middleware/versioner/header.rb'
75
75
- ' lib/grape/path.rb'
76
76
77
- # Offense count: 1
78
- # Configuration parameters: MinBodyLength.
79
- Style/GuardClause :
80
- Exclude :
81
- - ' lib/grape/endpoint.rb'
82
-
83
77
# Offense count: 14
84
78
# Configuration parameters: EnforcedStyle, SupportedStyles.
85
79
# SupportedStyles: compact, exploded
Original file line number Diff line number Diff line change @@ -22,11 +22,8 @@ def new(*args, &block)
22
22
def before_each ( new_setup = false , &block )
23
23
@before_each ||= [ ]
24
24
if new_setup == false
25
- if block_given?
26
- @before_each << block
27
- else
28
- return @before_each
29
- end
25
+ return @before_each unless block_given?
26
+ @before_each << block
30
27
else
31
28
@before_each = [ new_setup ]
32
29
end
You can’t perform that action at this time.
0 commit comments