Class: Vx::ContainerConnector::Local::Spawner
- Inherits:
-
Object
- Object
- Vx::ContainerConnector::Local::Spawner
- Includes:
- Vx::Common::Spawn
- Defined in:
- lib/vx/container_connector/local/spawner.rb
Instance Attribute Summary collapse
-
#work_dir ⇒ Object
readonly
Returns the value of attribute work_dir.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(work_dir) ⇒ Spawner
constructor
A new instance of Spawner.
- #spawn(*args, &logger) ⇒ Object
Constructor Details
#initialize(work_dir) ⇒ Spawner
Returns a new instance of Spawner.
12 13 14 |
# File 'lib/vx/container_connector/local/spawner.rb', line 12 def initialize(work_dir) @work_dir = work_dir end |
Instance Attribute Details
#work_dir ⇒ Object (readonly)
Returns the value of attribute work_dir.
10 11 12 |
# File 'lib/vx/container_connector/local/spawner.rb', line 10 def work_dir @work_dir end |
Instance Method Details
#id ⇒ Object
26 27 28 |
# File 'lib/vx/container_connector/local/spawner.rb', line 26 def id 'local' end |
#spawn(*args, &logger) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/vx/container_connector/local/spawner.rb', line 16 def spawn(*args, &logger) env = args.first.is_a?(Hash) ? args.shift : {} = args.last.is_a?(Hash) ? args.pop : {} cmd = args .merge!(chdir: work_dir) super(env, cmd, , &logger) end |