Class: Yoptparse::Command
- Inherits:
-
Object
- Object
- Yoptparse::Command
- Defined in:
- lib/yoptparse/command.rb
Class Method Summary collapse
Class Method Details
.banner ⇒ String
5 6 7 8 9 10 |
# File 'lib/yoptparse/command.rb', line 5 def string = ::YARD::Registry.at("#{self}#initialize").docstring unless string.empty? string end end |
.parse(argv) ⇒ Yoptparse::Command
14 15 16 17 18 |
# File 'lib/yoptparse/command.rb', line 14 def parse(argv) option_parser, result_store = generate_option_parser_and_result_store option_parser.parse(argv) new(result_store) end |
.to_option_parser ⇒ OptionParser
21 22 23 |
# File 'lib/yoptparse/command.rb', line 21 def to_option_parser generate_option_parser_and_result_store.first end |