Class: AuctionFunCore::Services::Mail::AuctionContext::PostAuction::ParticipantMailer

Inherits:
Object
  • Object
show all
Includes:
IdleMailer::Mailer, IdleMailer::TemplateManager
Defined in:
lib/auction_fun_core/services/mail/auction_context/post_auction/participant_mailer.rb

Overview

Service class responsible for sending emails to auction participants.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auction, participant, statistics) ⇒ ParticipantMailer

Initializes a new ParticipantMailer instance.

Parameters:

  • auction (ROM::Struct::Auction)

    The auction object

  • participant (ROM::Struct::User)

    The participant object

  • statistics (OpenStruct)

    Statistics object



18
19
20
21
22
23
24
# File 'lib/auction_fun_core/services/mail/auction_context/post_auction/participant_mailer.rb', line 18

def initialize(auction, participant, statistics)
  @auction = auction
  @participant = participant
  @statistics = statistics
  mail.to = participant.email
  mail.subject = I18n.t("mail.auction_context.post_auction.participant_mailer.subject", title: @auction.title)
end

Class Method Details

.template_nameString

Returns the template name for the ParticipantMailer.

Returns:

  • (String)

    The template name.



29
30
31
# File 'lib/auction_fun_core/services/mail/auction_context/post_auction/participant_mailer.rb', line 29

def self.template_name
  IdleMailer.config.templates.join("auction_context/post_auction/participant")
end