Class: Rafflesia::SimulationRuntimeBootstrapData

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

Constant Summary collapse

HASH_ATTRS =
{
  created_venv: :created_venv,
  environment_dir: :environment_dir,
  force_recreate: :force_recreate,
  install_requested: :install_requested,
  installed_packages: :installed_packages,
  is_ready: :is_ready,
  manifest: :manifest,
  manifest_path: :manifest_path,
  manifest_sha256: :manifest_sha_256,
  packages: :packages,
  pip_executable: :pip_executable,
  python_executable: :python_executable,
  runtime: :runtime,
  runtime_id: :runtime_id,
  schema_version: :schema_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SimulationRuntimeBootstrapData

Returns a new instance of SimulationRuntimeBootstrapData.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @created_venv = hash[:created_venv]
  @environment_dir = hash[:environment_dir]
  @force_recreate = hash[:force_recreate]
  @install_requested = hash[:install_requested]
  @installed_packages = hash[:installed_packages]
  @is_ready = hash[:is_ready]
  @manifest = hash[:manifest] ? Rafflesia::SimulationRuntimeBootstrapManifest.new(hash[:manifest]) : nil
  @manifest_path = hash[:manifest_path]
  @manifest_sha_256 = hash[:manifest_sha256]
  @packages = (hash[:packages] || []).map { |item| item ? Rafflesia::SimulationRuntimeBootstrapPackage.new(item) : nil }
  @pip_executable = hash[:pip_executable]
  @python_executable = hash[:python_executable]
  @runtime = hash[:runtime] ? Rafflesia::SimulationRuntimeInspectData.new(hash[:runtime]) : nil
  @runtime_id = hash[:runtime_id]
  @schema_version = hash[:schema_version]
end

Instance Attribute Details

#created_venvObject

Returns the value of attribute created_venv.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def created_venv
  @created_venv
end

#environment_dirObject

Returns the value of attribute environment_dir.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def environment_dir
  @environment_dir
end

#force_recreateObject

Returns the value of attribute force_recreate.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def force_recreate
  @force_recreate
end

#install_requestedObject

Returns the value of attribute install_requested.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def install_requested
  @install_requested
end

#installed_packagesObject

Returns the value of attribute installed_packages.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def installed_packages
  @installed_packages
end

#is_readyObject

Returns the value of attribute is_ready.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def is_ready
  @is_ready
end

#manifestObject

Returns the value of attribute manifest.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def manifest
  @manifest
end

#manifest_pathObject

Returns the value of attribute manifest_path.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def manifest_path
  @manifest_path
end

#manifest_sha_256Object

Returns the value of attribute manifest_sha_256.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def manifest_sha_256
  @manifest_sha_256
end

#packagesObject

Returns the value of attribute packages.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def packages
  @packages
end

#pip_executableObject

Returns the value of attribute pip_executable.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def pip_executable
  @pip_executable
end

#python_executableObject

Returns the value of attribute python_executable.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def python_executable
  @python_executable
end

#runtimeObject

Returns the value of attribute runtime.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def runtime
  @runtime
end

#runtime_idObject

Returns the value of attribute runtime_id.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def runtime_id
  @runtime_id
end

#schema_versionObject

Returns the value of attribute schema_version.



26
27
28
# File 'lib/rafflesia/simulations/simulation_runtime_bootstrap_data.rb', line 26

def schema_version
  @schema_version
end