Exception: Card::PermissionDenied
- Defined in:
- lib/card/exceptions.rb
Instance Attribute Summary collapse
-
#card ⇒ Object
readonly
Returns the value of attribute card.
Instance Method Summary collapse
- #build_message ⇒ Object
-
#initialize(card) ⇒ PermissionDenied
constructor
A new instance of PermissionDenied.
Constructor Details
#initialize(card) ⇒ PermissionDenied
Returns a new instance of PermissionDenied.
20 21 22 23 |
# File 'lib/card/exceptions.rb', line 20 def initialize card @card = card super end |
Instance Attribute Details
#card ⇒ Object (readonly)
Returns the value of attribute card.
18 19 20 |
# File 'lib/card/exceptions.rb', line 18 def card @card end |
Instance Method Details
#build_message ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/card/exceptions.rb', line 25 def if msg = @card.errors[:permission_denied] "for card #{@card.name}: #{msg}" else super end end |