Class: SubCmdOptParser::OptionParserForSubCmd
- Inherits:
-
OptionParser
- Object
- OptionParser
- SubCmdOptParser::OptionParserForSubCmd
- Defined in:
- lib/subcommand_optparse.rb
Instance Attribute Summary collapse
-
#subcommand_name ⇒ Object
Returns the value of attribute subcommand_name.
Instance Method Summary collapse
Instance Attribute Details
#subcommand_name ⇒ Object
Returns the value of attribute subcommand_name.
7 8 9 |
# File 'lib/subcommand_optparse.rb', line 7 def subcommand_name @subcommand_name end |
Instance Method Details
#banner ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/subcommand_optparse.rb', line 9 def unless @banner @banner = "Usage: #{program_name} #{@subcommand_name || '<command>'} [options]" visit(:add_banner, @banner) end @banner end |