class Spritpreisrechner::PaymentMethod
Attributes
cash[R]
credit_card[R]
debit_card[R]
others[R]
Public Class Methods
new(payment_method)
click to toggle source
# File lib/spritpreisrechner/payment_method.rb, line 5 def initialize(payment_method) @cash = payment_method[:cash] @debit_card = payment_method[:debitCard] @credit_card = payment_method[:creditCard] @others = payment_method[:others]&.split(', ') end
Public Instance Methods
cash?()
click to toggle source
# File lib/spritpreisrechner/payment_method.rb, line 12 def cash? @cash == true end
credit_card?()
click to toggle source
# File lib/spritpreisrechner/payment_method.rb, line 20 def credit_card? @debit_card == true end
debit_card?()
click to toggle source
# File lib/spritpreisrechner/payment_method.rb, line 16 def debit_card? @debit_card == true end