Class: Rubber::Configuration::ConfigHolder
- Inherits:
-
Object
- Object
- Rubber::Configuration::ConfigHolder
- Defined in:
- lib/rubber/configuration.rb
Instance Method Summary collapse
- #environment ⇒ Object
-
#initialize(env = nil, root = nil) ⇒ ConfigHolder
constructor
A new instance of ConfigHolder.
- #instance ⇒ Object
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
#environment ⇒ Object
37 38 39 |
# File 'lib/rubber/configuration.rb', line 37 def environment @environment end |
#instance ⇒ Object
41 42 43 |
# File 'lib/rubber/configuration.rb', line 41 def instance @instance end |