class Spinup::Runner

Public Class Methods

new(playground, dir) click to toggle source
# File lib/spinup/runner.rb, line 3
def initialize(playground, dir)
  default_dir = File.expand_path(Spinup::Config::DEFAULT_DIR)
  session_key = SecureRandom.hex[0..6]

  directory = dir || Locator.new(default_dir).(playground, session_key)
  config = Config::PLAYGROUNDS[playground]

  builder = PlaygroundBuilder.new(directory, Opener.new)
  builder.(playground, config)
end