Sha256: b1e470a1fc5f3717446644ddd2135fab7ebda7e18effb9c93298a25a71da2dda
Contents?: true
Size: 1.32 KB
Versions: 87
Compression:
Stored size: 1.32 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, :audit_model def initialize @email_able_models = [] @switchboard_able_models = [] @audit_model = :user end def self.reset instance.email_able_models = [] instance.switchboard_able_models = [] instance.audit_model = :user end def self.audit_model_log_class audit_model_log_class_name.constantize end def self.audit_model_log_class_name audit_model_log_symbol.camelize end def self.audit_model_log_symbol "#{instance.audit_model}_model_audit_log" end def self.audit_model_class_name instance.audit_model.to_s.camelize 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
87 entries across 87 versions & 1 rubygems