Class: MailEngine::Configuration
- Inherits:
-
Object
- Object
- MailEngine::Configuration
- Defined in:
- lib/mail_engine/configuration.rb
Overview
Load configure file from config/mail_engine_config.yml you can access the config by MailEngine::Base.current_config[]
Class Method Summary (collapse)
Class Method Details
+ (Object) load
6 7 8 9 10 11 |
# File 'lib/mail_engine/configuration.rb', line 6 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 |