Sha256: a7ee2b3aa136dc4432915e5fc248157725c43d1374e05e75549be164e16ac524

Contents?: true

Size: 456 Bytes

Versions: 3

Compression:

Stored size: 456 Bytes

Contents

# Utilities for Rakefiles.
#--
# Copyright 2006-2007 Suraj N. Kurapati
# See the file named LICENSE for details.

require 'fileutils'

module FileUtils
  alias old_sh sh

  # An improved sh() that also accepts arrays as arguments.
  def sh *aArgs, &aBlock
    old_sh(*collect_args(aArgs).reject {|i| i.to_s.empty?}, &aBlock)
  end

  # Collects the given arguments into a single, sparse array.
  def collect_args *aArgs
    aArgs.flatten.compact
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-vpi-16.0.1 lib/ruby-vpi/rake.rb
ruby-vpi-17.0.0 lib/ruby-vpi/rake.rb
ruby-vpi-18.0.0 lib/ruby-vpi/rake.rb