Class: Rafflesia::SimulationRuntimeBootstrapManifest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb

Constant Summary collapse

HASH_ATTRS =
{
  bootstrap_commands: :bootstrap_commands,
  created_at: :created_at,
  environment_dir: :environment_dir,
  packages: :packages,
  python_executable: :python_executable,
  runtime_id: :runtime_id,
  schema_version: :schema_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SimulationRuntimeBootstrapManifest

Returns a new instance of SimulationRuntimeBootstrapManifest.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @bootstrap_commands = (hash[:bootstrap_commands] || [])
  @created_at = hash[:created_at]
  @environment_dir = hash[:environment_dir]
  @packages = (hash[:packages] || []).map { |item| item ? Rafflesia::SimulationRuntimeBootstrapPackage.new(item) : nil }
  @python_executable = hash[:python_executable]
  @runtime_id = hash[:runtime_id]
  @schema_version = hash[:schema_version]
end

Instance Attribute Details

#bootstrap_commandsObject

Returns the value of attribute bootstrap_commands.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def bootstrap_commands
  @bootstrap_commands
end

#created_atObject

Returns the value of attribute created_at.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def created_at
  @created_at
end

#environment_dirObject

Returns the value of attribute environment_dir.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def environment_dir
  @environment_dir
end

#packagesObject

Returns the value of attribute packages.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def packages
  @packages
end

#python_executableObject

Returns the value of attribute python_executable.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def python_executable
  @python_executable
end

#runtime_idObject

Returns the value of attribute runtime_id.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def runtime_id
  @runtime_id
end

#schema_versionObject

Returns the value of attribute schema_version.



18
19
20
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_manifest.rb', line 18

def schema_version
  @schema_version
end