Sha256: 2597aab1a7c2e16c88023cb7ac60176a0ec3149bfcf5396f3409dea387331e20

Contents?: true

Size: 398 Bytes

Versions: 24

Compression:

Stored size: 398 Bytes

Contents

module Rasti
  class App
    class Settings
      class << self

        def load(environment)
          load_file File.join(Dir.pwd, "#{environment}.yml")
        end

        def load_file(filename)
          Hash::Accessible.new evaluate(File.read(filename))
        end

        private

        def evaluate(yml)
          YAML.load ERB.new(yml).result
        end

      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rasti-app-3.0.0 lib/rasti/app/settings.rb
rasti-app-2.2.4 lib/rasti/app/settings.rb
rasti-app-2.2.3 lib/rasti/app/settings.rb
rasti-app-2.2.2 lib/rasti/app/settings.rb
rasti-app-2.2.1 lib/rasti/app/settings.rb
rasti-app-2.2.0 lib/rasti/app/settings.rb
rasti-app-2.1.1 lib/rasti/app/settings.rb
rasti-app-2.1.0 lib/rasti/app/settings.rb
rasti-app-2.0.0 lib/rasti/app/settings.rb
rasti-app-1.1.0 lib/rasti/app/settings.rb
rasti-app-1.0.0 lib/rasti/app/settings.rb
rasti-app-0.1.2 lib/rasti/app/settings.rb
rasti-app-0.1.1 lib/rasti/app/settings.rb
rasti-app-0.1.0 lib/rasti/app/settings.rb
rasti-app-0.0.10 lib/rasti/app/settings.rb
rasti-app-0.0.9 lib/rasti/app/settings.rb
rasti-app-0.0.8 lib/rasti/app/settings.rb
rasti-app-0.0.7 lib/rasti/app/settings.rb
rasti-app-0.0.6 lib/rasti/app/settings.rb
rasti-app-0.0.5 lib/rasti/app/settings.rb