Exception: Card::Error::PermissionDenied
- Inherits:
-
Card::Error
- Object
- StandardError
- Card::Error
- Card::Error::PermissionDenied
- Defined in:
- lib/card/error.rb
Overview
permission errors
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.
Methods inherited from Card::Error
exception_view, problematic_exception_view, view_and_status
Constructor Details
#initialize(card) ⇒ PermissionDenied
Returns a new instance of PermissionDenied.
25 26 27 28 |
# File 'lib/card/error.rb', line 25 def initialize card @card = card super end |
Instance Attribute Details
#card ⇒ Object (readonly)
Returns the value of attribute card.
23 24 25 |
# File 'lib/card/error.rb', line 23 def card @card end |
Instance Method Details
#build_message ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/card/error.rb', line 30 def if (msg = @card.errors[:permission_denied]) I18n.t :exception_for_card, scope: [:lib, :card, :error], cardname: @card.name, message: msg else super end end |