Class: Replr::REPLMaker

Inherits:
Object
  • Object
show all
Defined in:
lib/replr/repl_maker.rb

Overview

Creates a REPL using template Dockerfiles & libraries

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argument_processorObject (readonly)

Returns the value of attribute argument_processor.



12
13
14
# File 'lib/replr/repl_maker.rb', line 12

def argument_processor
  @argument_processor
end

#librariesObject (readonly)

Returns the value of attribute libraries.



13
14
15
# File 'lib/replr/repl_maker.rb', line 13

def libraries
  @libraries
end

#process_runnerObject (readonly)

Returns the value of attribute process_runner.



12
13
14
# File 'lib/replr/repl_maker.rb', line 12

def process_runner
  @process_runner
end

#stackObject (readonly)

Returns the value of attribute stack.



13
14
15
# File 'lib/replr/repl_maker.rb', line 13

def stack
  @stack
end

#workdirObject (readonly)

Returns the value of attribute workdir.



13
14
15
# File 'lib/replr/repl_maker.rb', line 13

def workdir
  @workdir
end

Instance Method Details

#startObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/replr/repl_maker.rb', line 15

def start
  @argument_processor = Replr::ArgumentProcessor.new
  @process_runner = Replr::ProcessRunner.new

  @stack = argument_processor.arguments[0]
  @libraries = argument_processor.arguments[1..-1].sort!
  @workdir = Dir.mktmpdir

  check_docker!
  execute_processsed_arguments!
end