Class: Construi::Config::Global

Inherits:
Object
  • Object
show all
Includes:
BuildEnvironment
Defined in:
lib/construi/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Links

#links

Methods included from Volumes

#volumes, #volumes_from

Methods included from EnvironmentVariables

#env, #env_configured?, #env_hash

Methods included from Files

#files

Methods included from Image

#build, #image, #image_configured, #image_configured?, #privileged?

Methods included from WrappedYaml

#get, #key?, #parent, #with_parent

Constructor Details

#initialize(yaml) ⇒ Global

Returns a new instance of Global.



153
154
155
# File 'lib/construi/config.rb', line 153

def initialize(yaml)
  @yaml = yaml
end

Instance Attribute Details

#yamlObject (readonly)

Returns the value of attribute yaml.



151
152
153
# File 'lib/construi/config.rb', line 151

def yaml
  @yaml
end

Instance Method Details

#target(target) ⇒ Object



157
158
159
160
161
162
163
# File 'lib/construi/config.rb', line 157

def target(target)
  targets = yaml['targets']

  return nil if targets.nil?

  return Target.new yaml['targets'][target], self
end