Sha256: fe56967b46bd7a0ffda4090033eb40012e6073f9462575b3a7c8b2bfc2ccf3d4
Contents?: true
Size: 636 Bytes
Versions: 19
Compression:
Stored size: 636 Bytes
Contents
class Numeric def megabytes self * 1024 * 1024 end alias_method :megabyte, :megabytes def in_megabytes self.to_f / 1.megabyte end end class Object def blank? false end end class NilClass def blank? true end end class Array alias_method :blank?, :empty? end class String alias_method :blank?, :empty? end module FileUtils def sh(*cmd) options = Hash === cmd.last ? cmd.pop : {} puts "* #{cmd.join(' ')}" raise "Command failed: #{$?}" unless system(cmd.join(' ')) end module_function :sh def sudo(*cmd) sh ["sudo", *cmd] end module_function :sudo end
Version data entries
19 entries across 19 versions & 1 rubygems