Class: AuctionFunCore::Services::Mail::AuctionContext::PreAuction::AuctionStartReminderMailer

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

Overview

# Service class responsible for sending auction start reminder emails to participants.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auction, participant) ⇒ AuctionStartReminderMailer

Initializes a new AuctionStartReminderMailer instance.

Parameters:

  • auction (ROM::Struct::Auction)

    The auction object

  • participant (ROM::Struct::User)

    The participant object



17
18
19
20
21
22
# File 'lib/auction_fun_core/services/mail/auction_context/pre_auction/auction_start_reminder_mailer.rb', line 17

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

Class Method Details

.template_nameString

Returns the template name for the AuctionStartReminderMailer.

Returns:

  • (String)

    The template name.



27
28
29
# File 'lib/auction_fun_core/services/mail/auction_context/pre_auction/auction_start_reminder_mailer.rb', line 27

def self.template_name
  IdleMailer.config.templates.join("auction_context/pre_auction/auction_start_reminder")
end