Class: BuildEm::Runner
- Inherits:
-
Object
- Object
- BuildEm::Runner
- Defined in:
- lib/buildem/runner.rb
Instance Method Summary collapse
-
#initialize(kernel = Kernel, argv = ARGV) ⇒ Runner
constructor
A new instance of Runner.
- #process_standard_in ⇒ Object
- #start ⇒ Object
Constructor Details
Instance Method Details
#process_standard_in ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/buildem/runner.rb', line 40 def process_standard_in if @argv.empty? output = [] while input = @kernel.gets and not input == "start\n" output << input end unless output.empty? output = output.join("\n") @kernel.eval(output) end end end |
#start ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/buildem/runner.rb', line 53 def start if ARGV.size == 1 begin puts "running #{ARGV[0]}" $configuration = BuildEm::Configuration.new load ARGV[0] ensure puts "finished #{ARGV[0]}" end else puts usage end end |