Class: Specifier::CLI
- Inherits:
-
Object
- Object
- Specifier::CLI
- Defined in:
- lib/specifier/cli.rb
Overview
Used when interacting with the suite from the command line interface (CLI).
Usage:
cli = Specifier::CLI.new
cli.parse
Constant Summary collapse
- BANNER =
'usage: specifier [options] [./specs]'.freeze
Instance Method Summary collapse
Instance Method Details
#parse(items = ARGV) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/specifier/cli.rb', line 13 def parse(items = ARGV) config = Slop.parse(items) do || . = BANNER .on '-h', '--help', 'help' do return help() end .on '-v', '--version', 'version' do return version end .string '-f', '--formatter', 'formatter', default: Specifier::Formatter::DEFAULT end run(config) end |