lib/ratch/batch.rb in ratch-0.1 vs lib/ratch/batch.rb in ratch-0.2.1

- old
+ new

@@ -1,18 +1,22 @@ #require 'shellwords' require 'rbconfig' # replace with facets/rbsystem in future ? require 'ratch/taskutils' +require 'ratch/batchable' module Ratch # Batch File class, is used as an executionm context for a # ratch script. class BatchFile < Module include TaskUtils + include Batchable + include OpenBatchable + # Quick start, equivalent to calling new.run(file). #def self.start(file) # new(file).call #end @@ -27,10 +31,12 @@ # TODO What todo about arguments? def call(arguments=nil) script = File.read($0 = @file) eval(script, binding, $0) #instance_eval(script) - @main.call if @main + #@main.call if @main + task_manager.call_main + #run(:main) if task_manager.main end end end