Exception: Pay::InvalidPaymentMethod

Inherits:
Error
  • Object
show all
Defined in:
lib/pay.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payment) ⇒ InvalidPaymentMethod

Returns a new instance of InvalidPaymentMethod.



122
123
124
# File 'lib/pay.rb', line 122

def initialize(payment)
  @payment = payment
end

Instance Attribute Details

#payment ⇒ Object (readonly)

Returns the value of attribute payment.



120
121
122
# File 'lib/pay.rb', line 120

def payment
  @payment
end

Instance Method Details

#message ⇒ Object



126
127
128
# File 'lib/pay.rb', line 126

def message
  "This payment attempt failed because of an invalid payment method."
end