Class: Rubber::Configuration::ConfigHolder

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

Instance Method Summary collapse

Constructor Details

#initialize(env = nil, root = nil) ⇒ ConfigHolder

Returns a new instance of ConfigHolder.



30
31
32
33
34
35
# File 'lib/rubber/configuration.rb', line 30

def initialize(env=nil, root=nil)
  root = "#{RUBBER_ROOT}/config/rubber" unless root
  instance_cfg =  "#{root}/instance" + (env ? "-#{env}.yml" : ".yml")
  @environment = Environment.new("#{root}")
  @instance = Instance.new(instance_cfg)
end

Instance Method Details

#environmentObject



37
38
39
# File 'lib/rubber/configuration.rb', line 37

def environment
  @environment
end

#instanceObject



41
42
43
# File 'lib/rubber/configuration.rb', line 41

def instance
  @instance
end