Exception: Authz::Scopables::Base::NoApplicableScopables
- Inherits:
-
StandardError
- Object
- StandardError
- Authz::Scopables::Base::NoApplicableScopables
- Defined in:
- lib/authz/scopables/base.rb
Overview
Raised when the scoping system is used on an instance of a class that has no applicable scopables
Instance Attribute Summary collapse
-
#scoped_class ⇒ Object
readonly
Returns the value of attribute scoped_class.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NoApplicableScopables
constructor
A new instance of NoApplicableScopables.
Constructor Details
#initialize(options = {}) ⇒ NoApplicableScopables
Returns a new instance of NoApplicableScopables.
122 123 124 125 126 127 128 |
# File 'lib/authz/scopables/base.rb', line 122 def initialize( = {}) @scoped_class = .fetch(:scoped_class) = "#{scoped_class} has no applicable scopables. " \ 'Make sure you include the scopables modules ' \ 'inside the class definition.' super() end |
Instance Attribute Details
#scoped_class ⇒ Object (readonly)
Returns the value of attribute scoped_class.
120 121 122 |
# File 'lib/authz/scopables/base.rb', line 120 def scoped_class @scoped_class end |