Sha256: 380eac960fe44e1ac87c56ffa8afad1a017ee1a4a81318e26c9d95f482932683
Contents?: true
Size: 502 Bytes
Versions: 3
Compression:
Stored size: 502 Bytes
Contents
require 'yaml' module Waffle class Configuration def initialize(custom_params = {}) @configuration = {'strategy' => 'rabbitmq', 'url' => nil} if defined? Rails @configuration.merge! YAML.load_file("#{Rails.root}/config/#{Rails.env}.waffle.yml") end @configuration.merge! custom_params end def method_missing(m, *args, &block) if @configuration.has_key? m.to_s @configuration[m.to_s] else super end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
waffle-0.1.3 | lib/waffle/configuration.rb |
waffle-0.1.2 | lib/waffle/configuration.rb |
waffle-0.1.1 | lib/waffle/configuration.rb |