Class: UsedUpServicePackJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- UsedUpServicePackJob
- Defined in:
- app/workers/used_up_service_pack_job.rb
Instance Attribute Summary collapse
-
#sp ⇒ Object
readonly
Returns the value of attribute sp.
Instance Method Summary collapse
-
#initialize(sp) ⇒ UsedUpServicePackJob
constructor
A new instance of UsedUpServicePackJob.
- #perform ⇒ Object
Constructor Details
#initialize(sp) ⇒ UsedUpServicePackJob
Returns a new instance of UsedUpServicePackJob.
4 5 6 |
# File 'app/workers/used_up_service_pack_job.rb', line 4 def initialize(sp) @sp = sp end |
Instance Attribute Details
#sp ⇒ Object (readonly)
Returns the value of attribute sp.
2 3 4 |
# File 'app/workers/used_up_service_pack_job.rb', line 2 def sp @sp end |
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 |
# File 'app/workers/used_up_service_pack_job.rb', line 8 def perform User.where(admin: true).each do |user| ServicePacksMailer.used_up_email(user, @sp).deliver_now end end |