diff options
author | Phil Rees <philrees@gmail.com> | 2016-03-15 16:51:30 -0400 |
---|---|---|
committer | Phil Rees <philrees@gmail.com> | 2016-03-18 20:31:28 -0400 |
commit | d67a1b63f5232adb33acbfb03a79e51695a7ab88 (patch) | |
tree | f45173d08af11926d2dfb117c734a61ee36fcf88 /lib | |
parent | 601f498d572a37cb818bcb78f32aee286e8ff70a (diff) | |
download | slop-d67a1b63f5232adb33acbfb03a79e51695a7ab88.tar.gz |
Can specify a custom banner string in Options via config
Diffstat (limited to 'lib')
-rw-r--r-- | lib/slop/options.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/slop/options.rb b/lib/slop/options.rb index ed99c64..c1873d0 100644 --- a/lib/slop/options.rb +++ b/lib/slop/options.rb @@ -26,7 +26,7 @@ module Slop def initialize(**config) @options = [] @separators = [] - @banner = "usage: #{$0} [options]" + @banner = config[:banner].is_a?(String) ? config[:banner] : config.fetch(:banner, "usage: #{$0} [options]") @config = DEFAULT_CONFIG.merge(config) @parser = Parser.new(self, @config) |