Skip to content

Commit 3210e53

Browse files
committed
Fix Rubocop offenses
1 parent 84f25fc commit 3210e53

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.rubocop.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ plugins:
33
- rubocop-performance
44
- rubocop-rake
55
- rubocop-rspec
6-
7-
require:
86
- rubocop-rspec_rails
97

108
AllCops:

app/controllers/redis_web_manager/keys_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,27 +126,27 @@ def keys # rubocop:disable Metrics/AbcSize
126126
end
127127

128128
def filter_by_type(keys, type)
129-
return keys if invalid_option(type)
129+
return keys if invalid_option?(type)
130130

131131
keys.select { |key| key[:type] == type }
132132
end
133133

134134
# rubocop:disable Layout/EmptyLineAfterGuardClause
135135
def filter_by_expiry(keys, expiry)
136-
return keys if invalid_option(expiry)
136+
return keys if invalid_option?(expiry)
137137
duration = expiry.to_i
138138
return keys.select { |key| key[:expiry] == -1 } if duration == -1
139139
keys.select { |key| key[:expiry] != -1 && key[:expiry] < duration }
140140
end
141141
# rubocop:enable Layout/EmptyLineAfterGuardClause
142142

143143
def filter_by_memory(keys, memory)
144-
return keys if invalid_option(memory)
144+
return keys if invalid_option?(memory)
145145

146146
keys.select { |key| key[:memory] < memory.to_i }
147147
end
148148

149-
def invalid_option(option)
149+
def invalid_option?(option)
150150
option.nil? || option == 'all'
151151
end
152152

0 commit comments

Comments
 (0)