Module: Rake::DSL

Defined in:
lib/sevgi/external/rake.rb

Instance Method Summary collapse

Instance Method Details

#sevgi(file, *args) ⇒ Object

Thin DSL wrapper to call a script without spawning a shell.



9
10
11
12
13
14
15
# File 'lib/sevgi/external/rake.rb', line 9

def sevgi(file, *args)
  (save = ARGV.dup) and ARGV.replace(args) unless args.empty?

  Sevgi::Sandbox.run(file) { include Sevgi::External }
ensure
  ARGV.replace(save) unless args.empty?
end