Sha256: 4c4f4742e99dfe82a05890296b1e53f2a581c95af5db73faf7fee7f97bbbb05d

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 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

1 entries across 1 versions & 1 rubygems

Version Path
ruby-vpi-16.0.0 lib/ruby-vpi/rake.rb