Class: Cl::Config::Env

Inherits:
Struct
  • Object
show all
Includes:
Merge
Defined in:
lib/cl/config/env.rb

Constant Summary collapse

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

Constants included from Merge

Merge::MERGE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Merge

#merge

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/cl/config/env.rb', line 5

def name
  @name
end

Instance Method Details

#loadObject



11
12
13
14
# File 'lib/cl/config/env.rb', line 11

def load
  vars = opts.map { |cmd, opts| vars(cmd, opts) }
  merge(*vars.flatten.compact)
end