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 |
# File 'lib/specifier/cli.rb', line 13 def parse(items = ARGV) config = Slop.parse(items) do || . = BANNER .on('-h', '--help', 'help') { return help() } .on('-v', '--version', 'version') { return version } .string('-f', '--formatter', 'formatter', default: Specifier::Formatter::DEFAULT) end run(config) end |