Class: Verifica::Configuration
- Inherits:
-
Object
- Object
- Verifica::Configuration
- Defined in:
- lib/verifica/configuration.rb
Overview
Configuration object for Authorizer, holds list of registered resources and other params
Instance Attribute Summary collapse
-
#resources ⇒ Array<ResourceConfiguration>
readonly
Array of registered resources.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#register_resource(type, possible_actions, acl_provider) ⇒ self
Register a new resource supported by Authorizer.
Constructor Details
#initialize ⇒ Configuration
Note:
Use Verifica.authorizer instead of this constructor directly
Returns a new instance of Configuration.
20 21 22 |
# File 'lib/verifica/configuration.rb', line 20 def initialize @resources = [] end |
Instance Attribute Details
#resources ⇒ Array<ResourceConfiguration> (readonly)
Returns array of registered resources.
15 16 17 |
# File 'lib/verifica/configuration.rb', line 15 def resources @resources end |
Instance Method Details
#register_resource(type, possible_actions, acl_provider) ⇒ self
Register a new resource supported by Authorizer
36 37 38 39 |
# File 'lib/verifica/configuration.rb', line 36 def register_resource(type, possible_actions, acl_provider) resources << ResourceConfiguration.new(type, possible_actions, acl_provider) self end |