Apply Rubocop Performance/BlockGivenWithExplicitBlock (#23441)
* Apply Rubocop Performance/BlockGivenWithExplicitBlock * Unprefix used block parameter
This commit is contained in:
@ -87,7 +87,7 @@ class Trends::History
|
||||
end
|
||||
|
||||
def each(&block)
|
||||
if block_given?
|
||||
if block
|
||||
(0...7).map { |i| yield(get(i.days.ago)) }
|
||||
else
|
||||
to_enum(:each)
|
||||
|
Reference in New Issue
Block a user