diff options
author | Tim Smith <tsmith@chef.io> | 2019-05-13 19:23:59 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2019-05-13 19:23:59 -0700 |
commit | 32ee9105705e3484ddcb2953ed8675c50d5035e7 (patch) | |
tree | 60688e2a7af84fd5e298420d78deb1a26ab57559 /lib | |
parent | 552319d566b65f63fd2f11267ad4d177930a69e0 (diff) | |
download | mixlib-cli-32ee9105705e3484ddcb2953ed8675c50d5035e7.tar.gz |
Add more specs and use or not and
This seems to make more sense
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mixlib/cli.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mixlib/cli.rb b/lib/mixlib/cli.rb index 4141e4a..f3598e6 100644 --- a/lib/mixlib/cli.rb +++ b/lib/mixlib/cli.rb @@ -324,11 +324,11 @@ module Mixlib # @private # @param opt_arry [Array] # - # @return [String] a friendly quoted list of items complete with "and" + # @return [String] a friendly quoted list of items complete with "or" def friendly_opt_list(opt_array) opts = opt_array.map { |x| "'#{x}'" } - return opts.join(" and ") if opts.size < 3 - opts[0..-2].join(", ") + " and " + opts[-1] + return opts.join(" or ") if opts.size < 3 + opts[0..-2].join(", ") + ", or " + opts[-1] end def self.included(receiver) |