Sha256: 7cbc9bd7d2efaf2bfe2ad8d0027ff546ebbe10f2ac68910b8f25a7b66ed6cbfe
Contents?: true
Size: 540 Bytes
Versions: 12
Compression:
Stored size: 540 Bytes
Contents
module MailEngine # Load configure file from config/mail_engine_config.yml # you can access the config by MailEngine::Base.current_config[] class Configuration class << self def load require 'erb' # make config file support erb tags. like <% %> config_path = File.join(Rails.root, "config", "mail_engine_config.yml") MailEngine::Base.configurations = {} MailEngine::Base.configurations = YAML::load(ERB.new(IO.read(config_path)).result) if File.exist?(config_path) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems