Exception: Banken::NotAuthorizedError
- Defined in:
- lib/banken/error.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#loyalty ⇒ Object
readonly
Returns the value of attribute loyalty.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NotAuthorizedError
constructor
A new instance of NotAuthorizedError.
Constructor Details
#initialize(options = {}) ⇒ NotAuthorizedError
Returns a new instance of NotAuthorizedError.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/banken/error.rb', line 7 def initialize(={}) if .is_a? String = else @controller = [:controller] @query = [:query] @loyalty = [:loyalty] = .fetch(:message) { "not allowed to #{query} of #{controller} by #{loyalty.inspect}" } end super() end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
5 6 7 |
# File 'lib/banken/error.rb', line 5 def controller @controller end |
#loyalty ⇒ Object (readonly)
Returns the value of attribute loyalty.
5 6 7 |
# File 'lib/banken/error.rb', line 5 def loyalty @loyalty end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
5 6 7 |
# File 'lib/banken/error.rb', line 5 def query @query end |