Module: FileUtils
- Defined in:
- lib/sevgi/binaries/rake.rb
Overview
Extends FileUtils with Sevgi script helpers for Rake tasks.
Instance Method Summary collapse
-
#sevgi(file, *args, **kwargs) ⇒ Sevgi::Executor::Scope?
Thin DSL wrapper to call a script without spawning a shell.
Instance Method Details
#sevgi(file, *args, **kwargs) ⇒ Sevgi::Executor::Scope?
Thin DSL wrapper to call a script without spawning a shell.
The script receives positional arguments through ARGA and keyword arguments through ARGH.
20 21 22 23 24 25 26 27 |
# File 'lib/sevgi/binaries/rake.rb', line 20 def sevgi(file, *args, **kwargs) Sevgi::Executor.execute_file(Sevgi::F.existing!(file, [Sevgi::EXTENSION])) do extend(Sevgi) const_set(:ARGA, args).freeze const_set(:ARGH, kwargs).freeze end end |