lib/ratch/dsl/batch.rb in ratch-0.4.0 vs lib/ratch/dsl/batch.rb in ratch-0.4.1

- old
+ new

@@ -60,17 +60,23 @@ def call_directory @call_directory ||= File.expand_path(File.dirname($0)) end - # TODO Better name? Better definition? + # TODO Better name? (system_directory ?) def batch_directory + # TODO: Better definition? @batch_directory ||= ( dir = call_directory.sub(root_directory + '/', '').split('/').first File.join(root_directory, dir) ) end + + # If a system directory is used (as opposed to a local project directory) + # then the batch directory will need to be set explicitly. + + attr_writer :batch_directory # Current batch file, relative to the batch directory. def batch_file File.expand_path($0).sub(batch_directory + '/', '')