Class: C2eCore::Drops::CreditsRewardDrop

Inherits:
BaseDrop
  • Object
show all
Defined in:
/build/app/mailers/c2e_core/drops/credits_reward_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(reward) ⇒ CreditsRewardDrop

Returns a new instance of CreditsRewardDrop.



6
7
8
9
# File '/build/app/mailers/c2e_core/drops/credits_reward_drop.rb', line 6

def initialize(reward)
  super()
  @reward = reward
end

Instance Method Details

#amountFloat

Returns - Amount.

Returns:

  • (Float)
    • Amount.



12
13
14
# File '/build/app/mailers/c2e_core/drops/credits_reward_drop.rb', line 12

def amount
  @reward.amount
end

#cash_payment_decimalsInteger

Returns - The number of decimal places the ‘amount` should be rounded to.

Returns:

  • (Integer)
    • The number of decimal places the ‘amount` should be rounded to.



22
23
24
# File '/build/app/mailers/c2e_core/drops/credits_reward_drop.rb', line 22

def cash_payment_decimals
  @reward.cash_payment_decimals
end

#formatted_amountString

Returns - Formatted value of ‘amount`.

Returns:

  • (String)
    • Formatted value of ‘amount`.



17
18
19
# File '/build/app/mailers/c2e_core/drops/credits_reward_drop.rb', line 17

def formatted_amount
  @reward.formatted_amount
end