Module: Authority::Abilities::ClassMethods
- Includes:
- Definitions
- Defined in:
- lib/authority/abilities.rb
Instance Method Summary collapse
-
#authorizer ⇒ Class
Of the designated authorizer.
- #authorizer=(authorizer_class) ⇒ Object
Instance Method Details
#authorizer ⇒ Class
Returns of the designated authorizer.
50 51 52 53 54 55 56 |
# File 'lib/authority/abilities.rb', line 50 def @authorizer ||= .constantize # Get an actual reference to the authorizer class rescue NameError raise Authority::NoAuthorizerError.new( "#{} is set as the authorizer for #{self}, but the constant is missing" ) end |
#authorizer=(authorizer_class) ⇒ Object
44 45 46 47 |
# File 'lib/authority/abilities.rb', line 44 def () @authorizer = self. = @authorizer.name end |