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
-
#initialize(message) ⇒ PermissionDenied
constructor
A new instance of PermissionDenied.
- #message_from_card(card) ⇒ Object
Methods inherited from Card::Error
exception_view, problematic_exception_view, simple_exception_view, view_and_status
Constructor Details
#initialize(message) ⇒ PermissionDenied
Returns a new instance of PermissionDenied.
28 29 30 31 32 33 34 |
# File 'lib/card/error.rb', line 28 def initialize if .is_a? Card super () else super end end |
Instance Attribute Details
#card ⇒ Object (readonly)
Returns the value of attribute card.
26 27 28 |
# File 'lib/card/error.rb', line 26 def card @card end |
Instance Method Details
#message_from_card(card) ⇒ Object
36 37 38 39 40 |
# File 'lib/card/error.rb', line 36 def card I18n.t :exception_for_card, scope: [:lib, :card, :error], cardname: card.name, message: card.errors[:permission_denied] end |