Module: Envyable

Defined in:
lib/envyable.rb,
lib/envyable/cli.rb,
lib/envyable/loader.rb,
lib/envyable/railtie.rb,
lib/envyable/version.rb

Overview

Public: A simple yaml to ENV loader.

Defined Under Namespace

Classes: CLI, Loader, Railtie

Constant Summary collapse

VERSION =
"1.2.0"

Class Method Summary collapse

Class Method Details

.load(path, environment = 'development') ⇒ Object

Public: load the yaml file from path and set the variables in the given environment to the ENV.

path - a Pathname or String that describes where the yaml file

resides.

environment - a String describing the environment from which to load the

variables (default: development).

Examples

Envyable.load('config/env.yml')

Envyable.load('config/application.yml', 'production')

Returns nothing.



23
24
25
# File 'lib/envyable.rb', line 23

def self.load(path, environment = 'development')
  Loader.new(path).load(environment)
end