Class: Web47core::Config
- Inherits:
-
Object
- Object
- Web47core::Config
- Includes:
- Singleton
- Defined in:
- lib/web47core/config.rb
Overview
Configuration for the Web47Core platform
Instance Attribute Summary collapse
-
#audit_model ⇒ Object
Returns the value of attribute audit_model.
-
#email_able_models ⇒ Object
Returns the value of attribute email_able_models.
-
#switchboard_able_models ⇒ Object
Returns the value of attribute switchboard_able_models.
Class Method Summary collapse
- .audit_model_class_name ⇒ Object
- .audit_model_log_class ⇒ Object
- .audit_model_log_class_name ⇒ Object
- .audit_model_log_symbol ⇒ Object
-
.method_missing(method, *args, &block) ⇒ Object
Provide access to the instance accessors through static methods.
- .reset ⇒ Object
- .respond_to?(method_name, _include_private = false) ⇒ Boolean
- .respond_to_missing?(method_name, _include_private = false) ⇒ Boolean
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 |
# File 'lib/web47core/config.rb', line 11 def initialize @email_able_models = [] @switchboard_able_models = [] @audit_model = :user end |
Instance Attribute Details
#audit_model ⇒ Object
Returns the value of attribute audit_model.
9 10 11 |
# File 'lib/web47core/config.rb', line 9 def audit_model @audit_model end |
#email_able_models ⇒ Object
Returns the value of attribute email_able_models.
9 10 11 |
# File 'lib/web47core/config.rb', line 9 def email_able_models @email_able_models end |
#switchboard_able_models ⇒ Object
Returns the value of attribute switchboard_able_models.
9 10 11 |
# File 'lib/web47core/config.rb', line 9 def switchboard_able_models @switchboard_able_models end |
Class Method Details
.audit_model_class_name ⇒ Object
35 36 37 |
# File 'lib/web47core/config.rb', line 35 def self.audit_model_class_name instance.audit_model.to_s.camelize end |
.audit_model_log_class ⇒ Object
23 24 25 |
# File 'lib/web47core/config.rb', line 23 def self.audit_model_log_class audit_model_log_class_name.constantize end |
.audit_model_log_class_name ⇒ Object
27 28 29 |
# File 'lib/web47core/config.rb', line 27 def self.audit_model_log_class_name audit_model_log_symbol.camelize end |
.audit_model_log_symbol ⇒ Object
31 32 33 |
# File 'lib/web47core/config.rb', line 31 def self.audit_model_log_symbol "#{instance.audit_model}_model_audit_log" end |
.method_missing(method, *args, &block) ⇒ Object
Provide access to the instance accessors through static methods
42 43 44 45 46 47 48 |
# File 'lib/web47core/config.rb', line 42 def self.method_missing(method, *args, &block) if instance.respond_to?(method) instance.send(method, *args) else super end end |
.reset ⇒ Object
17 18 19 20 21 |
# File 'lib/web47core/config.rb', line 17 def self.reset instance.email_able_models = [] instance.switchboard_able_models = [] instance.audit_model = :user end |
.respond_to?(method_name, _include_private = false) ⇒ Boolean
50 51 52 |
# File 'lib/web47core/config.rb', line 50 def self.respond_to?(method_name, _include_private = false) instance.respond_to?(method_name) || super end |
.respond_to_missing?(method_name, _include_private = false) ⇒ Boolean
54 55 56 |
# File 'lib/web47core/config.rb', line 54 def self.respond_to_missing?(method_name, _include_private = false) instance.respond_to?(method_name) || super end |