Exception: KnowItAll::NotAuthorized
- Inherits:
-
StandardError
- Object
- StandardError
- KnowItAll::NotAuthorized
- Defined in:
- lib/know_it_all.rb
Instance Attribute Summary collapse
-
#policy ⇒ Object
Returns the value of attribute policy.
Instance Method Summary collapse
-
#initialize(policy) ⇒ NotAuthorized
constructor
A new instance of NotAuthorized.
- #to_s ⇒ Object
Constructor Details
#initialize(policy) ⇒ NotAuthorized
Returns a new instance of NotAuthorized.
62 63 64 |
# File 'lib/know_it_all.rb', line 62 def initialize(policy) self.policy = policy end |
Instance Attribute Details
#policy ⇒ Object
Returns the value of attribute policy.
60 61 62 |
# File 'lib/know_it_all.rb', line 60 def policy @policy end |
Instance Method Details
#to_s ⇒ Object
66 67 68 |
# File 'lib/know_it_all.rb', line 66 def to_s "KnowItAll::NotAuthorized: #{policy.errors.to_s}" end |