Class: Yell::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/yell/configuration.rb

Overview

The Configuration can be used to setup Yell before initializing an instance.

Class Method Summary collapse

Class Method Details

.load!(file) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/yell/configuration.rb', line 12

def self.load!( file )
  yaml = YAML.load( ERB.new(File.read(file)).result )

  # in case we have ActiveSupport
  if yaml.respond_to?(:with_indifference_access)
    yaml = yaml.with_indifferent_access
  end

  yaml[Yell.env] || {}
end