Skip to content

Commit

Permalink
Fix Naming/MemoizedInstanceVariableName cop
Browse files Browse the repository at this point in the history
Memoized variable @_remember_time_of_first_unprocessed_event does not match method name _wait_until_events. Use @_wait_until_events instead.
  • Loading branch information
AlexB52 committed Nov 29, 2023
1 parent 09c18f6 commit 9413316
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/listen/event/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ def _deadline

# blocks until event is popped
# returns the event or `nil` when the event_queue is closed
# rubocop:disable Naming/MemoizedInstanceVariableName
def _wait_until_events
config.event_queue.pop.tap do |_event|
@_remember_time_of_first_unprocessed_event ||= MonotonicTime.now
end
end
# rubocop:enable Naming/MemoizedInstanceVariableName

def _flush_wakeup_reasons
until @reasons.empty?
Expand Down

0 comments on commit 9413316

Please sign in to comment.