Sha256: 26169019f1862fa57c6827b26b1215ee52b7004af62975afb69371b78e2c7b38

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

module Mashery
  def self.load_rails_config!
    if File.exists? rails_config
      load_config! rails_config
    else
      raise MissingConfig.new
    end
  end

  def self.rails_config
    Rails.root.join("config", "mashery.yml")
  end

  class Engine < ::Rails::Engine
    initializer "load_masheri_config" do
      Mashery.load_rails_config!
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mashery_rails-0.6.2 lib/mashery/rails.rb