Sha256: 3e2e9472b2c379ab37af080b87749adfe775e8cfe18328c93df3c018ee4b47c9
Contents?: true
Size: 1.28 KB
Versions: 15
Compression:
Stored size: 1.28 KB
Contents
# frozen_string_literal: true module Web47core # # Configuration for the Web47Core platform # class Config include Singleton attr_accessor :email_able_models, :switchboard_able_models, :user_audit_model def initialize @email_able_models = [] @switchboard_able_models = [] @user_audit_model = :user end def self.reset instance.email_able_models = [] instance.switchboard_able_models = [] instance.user_audit_model = :user end def self.user_audit_model_log_class user_audit_model_log_class_name.constantize end def self.user_audit_model_log_class_name user_audit_model_log_symbol.camelize end def self.user_audit_model_log_symbol "#{instance.user_audit_model}_model_audit_log" end # # Provide access to the instance accessors through static methods # def self.method_missing(method, *args, &block) if instance.respond_to?(method) instance.send(method, *args) else super end end def self.respond_to?(method_name, _include_private = false) instance.respond_to?(method_name) || super end def self.respond_to_missing?(method_name, _include_private = false) instance.respond_to?(method_name) || super end end end
Version data entries
15 entries across 15 versions & 1 rubygems