Module: FileUtils
- Defined in:
- lib/ruby-vpi/rake.rb
Instance Method Summary collapse
-
#collect_args(*aArgs) ⇒ Object
Collects the given arguments into a single, sparse array.
- #old_sh ⇒ Object
-
#sh(*aArgs, &aBlock) ⇒ Object
An improved sh() that also accepts arrays as arguments.
Instance Method Details
#collect_args(*aArgs) ⇒ Object
Collects the given arguments into a single, sparse array.
17 18 19 |
# File 'lib/ruby-vpi/rake.rb', line 17 def collect_args *aArgs aArgs.flatten.compact end |
#old_sh ⇒ Object
9 |
# File 'lib/ruby-vpi/rake.rb', line 9 alias old_sh sh |
#sh(*aArgs, &aBlock) ⇒ Object
An improved sh() that also accepts arrays as arguments.
12 13 14 |
# File 'lib/ruby-vpi/rake.rb', line 12 def sh *aArgs, &aBlock old_sh(*collect_args(aArgs).reject {|i| i.to_s.empty?}, &aBlock) end |