Class: CmdParse::OptionParserWrapper
- Inherits:
-
ParserWrapper
- Object
- ParserWrapper
- CmdParse::OptionParserWrapper
- Defined in:
- lib/module_cmdparse/cmdparse/wrappers/optparse.rb
Overview
Parser wrapper for OptionParser (included in Ruby Standard Library).
Instance Method Summary collapse
-
#initialize(parser = OptionParser.new, &block) ⇒ OptionParserWrapper
constructor
Initializes the wrapper with a default OptionParser instance or the
parser
parameter and yields this instance. - #order(args) ⇒ Object
- #permute(args) ⇒ Object
- #summarize ⇒ Object
Methods inherited from ParserWrapper
Constructor Details
#initialize(parser = OptionParser.new, &block) ⇒ OptionParserWrapper
Initializes the wrapper with a default OptionParser instance or the parser
parameter and yields this instance.
46 47 48 49 |
# File 'lib/module_cmdparse/cmdparse/wrappers/optparse.rb', line 46 def initialize( parser = OptionParser.new, &block ) @instance = parser self.instance( &block ) end |
Instance Method Details
#order(args) ⇒ Object
51 52 53 |
# File 'lib/module_cmdparse/cmdparse/wrappers/optparse.rb', line 51 def order( args ) @instance.order( args ) end |
#permute(args) ⇒ Object
55 56 57 |
# File 'lib/module_cmdparse/cmdparse/wrappers/optparse.rb', line 55 def permute( args ) @instance.permute( args ) end |
#summarize ⇒ Object
59 60 61 |
# File 'lib/module_cmdparse/cmdparse/wrappers/optparse.rb', line 59 def summarize @instance.summarize end |