Class: Spinup::CLI
- Inherits:
-
Object
- Object
- Spinup::CLI
- Defined in:
- lib/spinup/cli.rb
Defined Under Namespace
Classes: Options
Class Method Summary collapse
Class Method Details
.parse(options, supported) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/spinup/cli.rb', line 7 def self.parse(, supported) args = Options.new('world') opt_parser = OptionParser.new do |opts| opts. = ['Usage: spinup <playground> [<directory>]', "Supported playgrounds: #{supported.map(&:to_s).join(', ')}"].join("\n") opts.on('-h', '--help', 'Prints this help') do puts opts exit end end opt_parser.parse!() args end |