Class: SolidQueueGuard::Runner Private

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_queue_guard/runner.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(scope: :config, enabled: SolidQueueGuard.enabled?) ⇒ Runner

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Runner.



6
7
8
9
# File 'lib/solid_queue_guard/runner.rb', line 6

def initialize(scope: :config, enabled: SolidQueueGuard.enabled?)
  @scope = scope
  @enabled = enabled
end

Instance Method Details

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
16
17
18
19
# File 'lib/solid_queue_guard/runner.rb', line 11

def run
  return Report.new([disabled_result]) unless enabled

  results = checks.map do |check_class|
    run_check(check_class)
  end

  Report.new(results)
end