Exception: StandardId::AccountLockedError
- Inherits:
-
StandardError
- Object
- StandardError
- StandardId::AccountLockedError
- Defined in:
- lib/standard_id/errors.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#lock_reason ⇒ Object
readonly
Returns the value of attribute lock_reason.
-
#locked_at ⇒ Object
readonly
Returns the value of attribute locked_at.
Instance Method Summary collapse
-
#initialize(account) ⇒ AccountLockedError
constructor
A new instance of AccountLockedError.
Constructor Details
#initialize(account) ⇒ AccountLockedError
Returns a new instance of AccountLockedError.
12 13 14 15 16 17 |
# File 'lib/standard_id/errors.rb', line 12 def initialize(account) @account = account @lock_reason = account.lock_reason @locked_at = account.locked_at super("Account has been locked#{lock_reason ? ": #{lock_reason}" : ""}") end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
10 11 12 |
# File 'lib/standard_id/errors.rb', line 10 def account @account end |
#lock_reason ⇒ Object (readonly)
Returns the value of attribute lock_reason.
10 11 12 |
# File 'lib/standard_id/errors.rb', line 10 def lock_reason @lock_reason end |
#locked_at ⇒ Object (readonly)
Returns the value of attribute locked_at.
10 11 12 |
# File 'lib/standard_id/errors.rb', line 10 def locked_at @locked_at end |