summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhil Rees <philrees@gmail.com>2016-03-15 16:51:30 -0400
committerPhil Rees <philrees@gmail.com>2016-03-18 20:31:28 -0400
commitd67a1b63f5232adb33acbfb03a79e51695a7ab88 (patch)
treef45173d08af11926d2dfb117c734a61ee36fcf88 /lib
parent601f498d572a37cb818bcb78f32aee286e8ff70a (diff)
downloadslop-d67a1b63f5232adb33acbfb03a79e51695a7ab88.tar.gz
Can specify a custom banner string in Options via config
Diffstat (limited to 'lib')
-rw-r--r--lib/slop/options.rb2
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)