Module: Ruolo
- Defined in:
- lib/ruolo.rb,
lib/ruolo/sync.rb,
lib/ruolo/version.rb,
lib/ruolo/models/role.rb,
lib/ruolo/models/user.rb,
lib/ruolo/configuration.rb,
lib/ruolo/models/permission.rb
Overview
Copyright 2019 Mario Finelli
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: Models Classes: Configuration, Sync
Constant Summary collapse
- VERSION =
'0.4.0'
Class Attribute Summary collapse
-
.configuration ⇒ Ruolo::Configuration
Get the current configuration.
Class Method Summary collapse
-
.configure {|comfig| ... } ⇒ Object
Gives a block with which to configure.
-
.reset ⇒ void
Reset the current configuration to the defaults.
-
.synchronize!(policy_file) ⇒ void
Given a policy file synchronize the roles and permissions in the database.
Class Attribute Details
.configuration ⇒ Ruolo::Configuration
Get the current configuration.
30 31 32 |
# File 'lib/ruolo.rb', line 30 def self.configuration @configuration ||= Ruolo::Configuration.new end |
Class Method Details
.configure {|comfig| ... } ⇒ Object
Gives a block with which to configure.
45 46 47 |
# File 'lib/ruolo.rb', line 45 def self.configure yield(configuration) end |
.reset ⇒ void
This method returns an undefined value.
Reset the current configuration to the defaults.
37 38 39 |
# File 'lib/ruolo.rb', line 37 def self.reset @configuration = Ruolo::Configuration.new end |