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

Version Path
mail_engine-0.1.12 lib/mail_engine/configuration.rb
mail_engine-0.1.11 lib/mail_engine/configuration.rb
mail_engine-0.1.10 lib/mail_engine/configuration.rb
mail_engine-0.1.9 lib/mail_engine/configuration.rb
mail_engine-0.1.8 lib/mail_engine/configuration.rb
mail_engine-0.1.7 lib/mail_engine/configuration.rb
mail_engine-0.1.6 lib/mail_engine/configuration.rb
mail_engine-0.1.5 lib/mail_engine/configuration.rb
mail_engine-0.1.4 lib/mail_engine/configuration.rb
mail_engine-0.1.3 lib/mail_engine/configuration.rb
mail_engine-0.1.2 lib/mail_engine/configuration.rb
mail_engine-0.1.1 lib/mail_engine/configuration.rb