Class: Npm3ppLister::CLI

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

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#listObject



23
24
25
26
27
28
29
30
# File 'lib/npm_3pp_lister/cli.rb', line 23

def list(*)
  if options[:help]
    invoke :help, ['list']
  else
    require_relative 'commands/list'
    Npm3ppLister::Commands::List.new(options).execute
  end
end

#versionObject



15
16
17
18
# File 'lib/npm_3pp_lister/cli.rb', line 15

def version
  require_relative 'version'
  puts "v#{Npm3ppLister::VERSION}"
end