Class: Sidekiq::Rails::Reloader
- Inherits:
-
Object
- Object
- Sidekiq::Rails::Reloader
- Defined in:
- lib/sidekiq/rails.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(app = ::Rails.application) ⇒ Reloader
constructor
A new instance of Reloader.
- #inspect ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(app = ::Rails.application) ⇒ Reloader
Returns a new instance of Reloader.
9 10 11 |
# File 'lib/sidekiq/rails.rb', line 9 def initialize(app = ::Rails.application) @app = app end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/sidekiq/rails.rb', line 13 def call params = (::Rails::VERSION::STRING >= "7.1") ? {source: "job.sidekiq"} : {} @app.reloader.wrap(**params) do yield end end |
#inspect ⇒ Object
20 21 22 |
# File 'lib/sidekiq/rails.rb', line 20 def inspect "#<Sidekiq::Rails::Reloader @app=#{@app.class.name}>" end |
#to_hash ⇒ Object
24 25 26 |
# File 'lib/sidekiq/rails.rb', line 24 def to_hash {app: @app.class.name} end |