Class: Construi::Config::Target

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Options

#options

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?, #with_parent

Constructor Details

#initialize(yaml, parent) ⇒ Target

Returns a new instance of Target.



172
173
174
175
# File 'lib/construi/config.rb', line 172

def initialize(yaml, parent)
  @yaml = yaml
  @parent = parent
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



170
171
172
# File 'lib/construi/config.rb', line 170

def parent
  @parent
end

#yamlObject (readonly)

Returns the value of attribute yaml.



170
171
172
# File 'lib/construi/config.rb', line 170

def yaml
  @yaml
end

Instance Method Details

#commandsObject



177
178
179
# File 'lib/construi/config.rb', line 177

def commands
  Array(@yaml.is_a?(Hash) ? @yaml['run'] : @yaml)
end