Class: Gem::Release::Config::Env

Inherits:
Object
  • Object
show all
Includes:
Helper::Hash
Defined in:
lib/gem/release/config/env.rb

Constant Summary collapse

PREFIX =
'GEM_RELEASE_'
TRUE =
/^(true|yes|on)$/
FALSE =
/^(false|no|off)$/

Constants included from Helper::Hash

Helper::Hash::MERGER

Instance Method Summary collapse

Methods included from Helper::Hash

#deep_merge, #except, #only, #symbolize_keys

Instance Method Details

#loadObject


13
14
15
16
17
# File 'lib/gem/release/config/env.rb', line 13

def load
  opts = vars.map { |key, value| to_hash(keys_for(key), cast(value)) }
  opts = opts.inject { |one, other| deep_merge(one, other) }
  opts || {}
end