Exception: Authz::Scopables::Base::NoApplicableScopables

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ NoApplicableScopables

Returns a new instance of NoApplicableScopables.



131
132
133
134
135
136
137
# File 'lib/authz/scopables/base.rb', line 131

def initialize(options = {})
  @scoped_class  = options.fetch(:scoped_class)
  message = "#{scoped_class} has no applicable scopables. " \
             'Make sure you include the scopables modules ' \
             'inside the class definition.'
  super(message)
end

Instance Attribute Details

#scoped_classObject (readonly)



129
130
131
# File 'lib/authz/scopables/base.rb', line 129

def scoped_class
  @scoped_class
end