Class: Yoptparse::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/yoptparse/command.rb

Class Method Summary collapse

Class Method Details


5
6
7
# File 'lib/yoptparse/command.rb', line 5

def banner
  ::YARD::Registry.at("#{self}#initialize").docstring
end

.parse(argv) ⇒ Yoptparse::Command


11
12
13
14
15
# File 'lib/yoptparse/command.rb', line 11

def parse(argv)
  option_parser, result_store = generate_option_parser_and_result_store
  option_parser.parse(argv)
  new(result_store)
end

.to_option_parserOptionParser


18
19
20
# File 'lib/yoptparse/command.rb', line 18

def to_option_parser
  generate_option_parser_and_result_store.first
end