Class: Redemption::Notification

Inherits:
Object
  • Object
show all
Includes:
MoneyRails::ActionViewExtension, Workers::Views
Defined in:
lib/redemption/notification.rb

Constant Summary collapse

I18n.t('external_links.faqs')

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Workers::Views

#render

Constructor Details

#initialize(reward, voucher = nil) ⇒ Notification

Returns a new instance of Notification.

Parameters:

  • reward (Reward)

    instance



15
16
17
18
# File 'lib/redemption/notification.rb', line 15

def initialize(reward, voucher = nil)
  self.reward = reward
  self.voucher = voucher
end

Instance Attribute Details

#rewardObject

Returns the value of attribute reward.



10
11
12
# File 'lib/redemption/notification.rb', line 10

def reward
  @reward
end

#voucherObject

Returns the value of attribute voucher.



10
11
12
# File 'lib/redemption/notification.rb', line 10

def voucher
  @voucher
end

Instance Method Details

#redeem_as_voucherObject



20
21
22
23
# File 'lib/redemption/notification.rb', line 20

def redeem_as_voucher
  send_redeem_as_voucher_email_to_user
  send_redeem_as_voucher_sms_to_user
end