Class: EC2Launcher::ConfigWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2launcher/config_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_directory) ⇒ ConfigWrapper

Returns a new instance of ConfigWrapper.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ec2launcher/config_wrapper.rb', line 16

def initialize(base_directory)
  # Load configuration data
  config_loader = ConfigLoader.new(base_directory)
  @config = config_loader.config

  env_processor = EnvironmentProcessor.new(base_directory, @config.environments)
  app_processor = ApplicationProcessor.new(base_directory, @config.applications)

  @environments = env_processor.environments
  @applications = app_processor.applications
end

Instance Attribute Details

#applicationsObject

Returns the value of attribute applications.



13
14
15
# File 'lib/ec2launcher/config_wrapper.rb', line 13

def applications
  @applications
end

#configObject

Returns the value of attribute config.



12
13
14
# File 'lib/ec2launcher/config_wrapper.rb', line 12

def config
  @config
end

#environmentsObject

Returns the value of attribute environments.



14
15
16
# File 'lib/ec2launcher/config_wrapper.rb', line 14

def environments
  @environments
end