class Vx::Lib::Container::Local
Constants
- Spawner
Attributes
work_dir[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/vx/lib/container/local.rb, line 12 def initialize(options = {}) @work_dir = options[:work_dir] || default_work_dir @work_dir = File.expand_path(@work_dir) end
Public Instance Methods
start() { |spawner| ... }
click to toggle source
# File lib/vx/lib/container/local.rb, line 17 def start(&block) FileUtils.rm_rf(work_dir) FileUtils.mkdir_p(work_dir) begin spawner = Spawner.new(work_dir) yield spawner ensure FileUtils.mkdir_p(work_dir) end end
Private Instance Methods
default_work_dir()
click to toggle source
# File lib/vx/lib/container/local.rb, line 31 def default_work_dir "#{::Dir.tmpdir}/vx_lib_container_#{::Process.pid}" end