Module: Sidekiq::Throttled::Web::SummaryFix

Defined in:
lib/sidekiq/throttled/web/summary_fix.rb

Constant Summary collapse

HTML =
File.read("#{__dir__}/summary_fix.html").freeze

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.enabledObject

Returns the value of attribute enabled



10
11
12
# File 'lib/sidekiq/throttled/web/summary_fix.rb', line 10

def enabled
  @enabled
end

Class Method Details

.apply!(app) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/sidekiq/throttled/web/summary_fix.rb', line 12

def apply!(app)
  if "4.2.0" <= Sidekiq::VERSION
    Sidekiq::WebAction.send(:prepend, SummaryFix)
  else
    app.send(:prepend, SummaryFix)
  end
end

Instance Method Details

#display_custom_headObject



21
22
23
# File 'lib/sidekiq/throttled/web/summary_fix.rb', line 21

def display_custom_head
  "#{super}#{HTML if SummaryFix.enabled}"
end