Class: Safedep::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(args = ARGV) ⇒ Object



6
7
8
# File 'lib/safedep/cli.rb', line 6

def self.run(args = ARGV)
  new.run(args)
end

Instance Method Details

#option_parserObject



24
25
26
# File 'lib/safedep/cli.rb', line 24

def option_parser
  @option_parser ||= OptionParser.new
end

#run(args) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/safedep/cli.rb', line 10

def run(args)
  option_parser.parse(args)

  runner = Runner.new(option_parser.configuration)
  runner.run

  puts 'Done.'

  true
rescue Safedep::Error => error
  warn error.message
  false
end