Class: Royal::InsufficientPointsError
- Defined in:
- lib/royal/insufficient_points_error.rb
Instance Attribute Summary collapse
- #amount ⇒ Integer readonly
- #balance ⇒ Integer readonly
- #owner ⇒ ActiveRecord::Base readonly
- #pointable ⇒ ActiveRecord::Base? readonly
- #reason ⇒ String? readonly
Instance Method Summary collapse
-
#initialize(owner, amount, balance, reason, pointable) ⇒ InsufficientPointsError
constructor
A new instance of InsufficientPointsError.
Constructor Details
#initialize(owner, amount, balance, reason, pointable) ⇒ InsufficientPointsError
Returns a new instance of InsufficientPointsError.
21 22 23 24 25 26 27 28 29 |
# File 'lib/royal/insufficient_points_error.rb', line 21 def initialize(owner, amount, balance, reason, pointable) @owner = owner @amount = amount @balance = balance @reason = reason @pointable = pointable super("Insufficient points: #{amount} (balance: #{balance})") end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
8 9 10 |
# File 'lib/royal/insufficient_points_error.rb', line 8 def amount @amount end |
#balance ⇒ Integer (readonly)
10 11 12 |
# File 'lib/royal/insufficient_points_error.rb', line 10 def balance @balance end |
#owner ⇒ ActiveRecord::Base (readonly)
6 7 8 |
# File 'lib/royal/insufficient_points_error.rb', line 6 def owner @owner end |
#pointable ⇒ ActiveRecord::Base? (readonly)
14 15 16 |
# File 'lib/royal/insufficient_points_error.rb', line 14 def pointable @pointable end |
#reason ⇒ String? (readonly)
12 13 14 |
# File 'lib/royal/insufficient_points_error.rb', line 12 def reason @reason end |