Sha256: 8f1ead672e986fd2edf4a6bfb45a9763c99b0baee59a3c482b7a3b30ae761aee
Contents?: true
Size: 468 Bytes
Versions: 1
Compression:
Stored size: 468 Bytes
Contents
module ShellTastic module Utils # A dirty string check for nil empty or just whitespace # @param [String] str the string the needs to be checked # @return [Boolean, nil] true if str is empty, nil, or just whitespace def string_nil_or_blank? str # raise if command is empty or nil if str !~ /[^[:space:]]/ || str.nil? || str.empty? raise ShellTastic::CommandException.new("Command is emtpy or nil") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shelltastic-0.2.5 | lib/shelltastic/utils.rb |