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
-
#email_able_models ⇒ Object
Returns the value of attribute email_able_models.
-
#switchboard_able_models ⇒ Object
Returns the value of attribute switchboard_able_models.
-
#user_audit_model ⇒ Object
Returns the value of attribute user_audit_model.
Class Method Summary collapse
-
.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
- .user_audit_model_log_class ⇒ Object
- .user_audit_model_log_class_name ⇒ Object
- .user_audit_model_log_symbol ⇒ Object
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 = [] @user_audit_model = :user end |
Instance Attribute Details
#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 |
#user_audit_model ⇒ Object
Returns the value of attribute user_audit_model.
9 10 11 |
# File 'lib/web47core/config.rb', line 9 def user_audit_model @user_audit_model end |
Class Method Details
.method_missing(method, *args, &block) ⇒ Object
Provide access to the instance accessors through static methods
38 39 40 41 42 43 44 |
# File 'lib/web47core/config.rb', line 38 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.user_audit_model = :user end |
.respond_to?(method_name, _include_private = false) ⇒ Boolean
46 47 48 |
# File 'lib/web47core/config.rb', line 46 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
50 51 52 |
# File 'lib/web47core/config.rb', line 50 def self.respond_to_missing?(method_name, _include_private = false) instance.respond_to?(method_name) || super end |
.user_audit_model_log_class ⇒ Object
23 24 25 |
# File 'lib/web47core/config.rb', line 23 def self.user_audit_model_log_class user_audit_model_log_class_name.constantize end |
.user_audit_model_log_class_name ⇒ Object
27 28 29 |
# File 'lib/web47core/config.rb', line 27 def self.user_audit_model_log_class_name user_audit_model_log_symbol.camelize end |
.user_audit_model_log_symbol ⇒ Object
31 32 33 |
# File 'lib/web47core/config.rb', line 31 def self.user_audit_model_log_symbol "#{instance.user_audit_model}_model_audit_log" end |