Class: Flico::CommandLineInterface
- Inherits:
-
Object
- Object
- Flico::CommandLineInterface
- Defined in:
- lib/flico.rb
Class Method Summary collapse
Class Method Details
.parse_args(args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/flico.rb', line 9 def self.parse_args(args) = {} OptionParser.new do |opts| opts. = 'Usage: flico [options] [10 keywords with space as delimiter]' opts.on('-f', '--file_name [FileName]', 'Collage FileName') do |f| [:file_name] = f end end.parse!(args) [args, ] end |
.start(args) ⇒ Object
20 21 22 23 |
# File 'lib/flico.rb', line 20 def self.start(args) keywords, = parse_args(args) App.new(keywords, ).create end |