diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 09:18:08 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 09:18:08 -0800 |
commit | bf7dd11678857699b2c7559db999e9d44dbc6370 (patch) | |
tree | b247d5cb689889c1119382784f37921251d83ae7 /lib/mixlib/cli.rb | |
parent | 1e943872d018515b8534965325661b0ecd64b1e5 (diff) | |
download | mixlib-cli-bf7dd11678857699b2c7559db999e9d44dbc6370.tar.gz |
chefstyle fixeslcg/chefrstyle
Diffstat (limited to 'lib/mixlib/cli.rb')
-rw-r--r-- | lib/mixlib/cli.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/mixlib/cli.rb b/lib/mixlib/cli.rb index e24d5b5..b3f108e 100644 --- a/lib/mixlib/cli.rb +++ b/lib/mixlib/cli.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'optparse' +require "optparse" module Mixlib @@ -92,7 +92,7 @@ module Mixlib # # === Returns # @banner<String>:: The current banner - def banner(bstring=nil) + def banner(bstring = nil) if bstring @banner = bstring else @@ -149,7 +149,7 @@ module Mixlib @opt_parser = nil # Set the banner - @banner = self.class.banner + @banner = self.class.banner # Dupe the class options for this instance klass_options = self.class.options @@ -187,7 +187,7 @@ module Mixlib # # === Returns # argv<Array>:: Returns any un-parsed elements. - def parse_options(argv=ARGV) + def parse_options(argv = ARGV) argv = argv.dup opt_parser.parse!(argv) @@ -216,7 +216,6 @@ module Mixlib argv end - # The option parser generated from the mixlib-cli DSL. +opt_parser+ can be # used to print a help message including the banner and any CLI options via # `puts opt_parser`. |