Class: AuctionFunCore::Services::Mail::AuctionContext::PostAuction::WinnerMailer
- Inherits:
-
Object
- Object
- AuctionFunCore::Services::Mail::AuctionContext::PostAuction::WinnerMailer
- Includes:
- IdleMailer::Mailer, IdleMailer::TemplateManager
- Defined in:
- lib/auction_fun_core/services/mail/auction_context/post_auction/winner_mailer.rb
Overview
Service class responsible for sending emails to auction winners.
Class Method Summary collapse
-
.template_name ⇒ String
Returns the template name for the WinnerMailer.
Instance Method Summary collapse
-
#initialize(auction, winner, statistics) ⇒ WinnerMailer
constructor
Initializes a new WinnerMailer instance.
Constructor Details
#initialize(auction, winner, statistics) ⇒ WinnerMailer
Initializes a new WinnerMailer instance.
18 19 20 21 22 23 24 |
# File 'lib/auction_fun_core/services/mail/auction_context/post_auction/winner_mailer.rb', line 18 def initialize(auction, winner, statistics) @auction = auction @winner = winner @statistics = statistics mail.to = winner.email mail.subject = I18n.t("mail.auction_context.post_auction.winner_mailer.subject", title: @auction.title) end |
Class Method Details
.template_name ⇒ String
Returns the template name for the WinnerMailer.
29 30 31 |
# File 'lib/auction_fun_core/services/mail/auction_context/post_auction/winner_mailer.rb', line 29 def self.template_name IdleMailer.config.templates.join("auction_context/post_auction/winner") end |