Class: StrongActions::Config
- Inherits:
-
Object
- Object
- StrongActions::Config
- Includes:
- Singleton
- Defined in:
- lib/strong_actions/config.rb
Instance Method Summary collapse
- #config_files ⇒ Object
- #config_files=(files) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #role_definition(role) ⇒ Object
- #roles ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 10 |
# File 'lib/strong_actions/config.rb', line 7 def initialize @config_files = ['config/acl.yml'] load_config_files end |
Instance Method Details
#config_files ⇒ Object
12 13 14 |
# File 'lib/strong_actions/config.rb', line 12 def config_files @config_files end |
#config_files=(files) ⇒ Object
16 17 18 19 |
# File 'lib/strong_actions/config.rb', line 16 def config_files=(files) config_files = files load_config_files end |
#role_definition(role) ⇒ Object
26 27 28 29 |
# File 'lib/strong_actions/config.rb', line 26 def role_definition(role) load_config_files if Rails.env.development? @acl[role] end |
#roles ⇒ Object
21 22 23 24 |
# File 'lib/strong_actions/config.rb', line 21 def roles load_config_files if Rails.env.development? @acl.keys end |