Sha256: 9a8130e5327021caa5ecb325ed9164e3cc4b508be843e19c93d98a14cf36a43e
Contents?: true
Size: 592 Bytes
Versions: 112
Compression:
Stored size: 592 Bytes
Contents
require 'shellwords' module Vmail class Query # args is an array like ARGV def self.parse(args) args = args.dup if args.is_a?(String) args = Shellwords.shellwords args end if args.size > 0 && args.first =~ /^\d+/ args.shift end query = if args.empty? ['ALL'] else args end query.map {|x| x.to_s.downcase} end def self.args2string(array) array.map {|x| x.to_s.split(/\s+/).size > 1 ? "\"#{x}\"" : x.to_s }.join(' ') end end end
Version data entries
112 entries across 112 versions & 1 rubygems