Method: Authority::Abilities::ClassMethods#authorizer

Defined in:
lib/authority/abilities.rb

#authorizerClass

Returns of the designated authorizer.

Returns:

  • (Class)

    of the designated authorizer



50
51
52
53
54
55
56
# File 'lib/authority/abilities.rb', line 50

def authorizer
  @authorizer ||= authorizer_name.constantize # Get an actual reference to the authorizer class
rescue NameError
  raise Authority::NoAuthorizerError.new(
            "#{authorizer_name} is set as the authorizer for #{self}, but the constant is missing"
        )
end