Class: Specifier::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/specifier/cli.rb

Constant Summary collapse

'usage: specifier [options] [./specs]'.freeze

Instance Method Summary collapse

Instance Method Details

#parse(items = ARGV) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/specifier/cli.rb', line 5

def parse(items = ARGV)
  config = Slop.parse(items) do |options|
    options.banner = BANNER

    options.on '-h', '--help', 'help' do
      return help(options)
    end

    options.on '-v', '--version', 'version' do
      return version
    end
  end

  run(config)
end