Class: Tara::Cli

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

Instance Method Summary collapse

Constructor Details

#initialize(argv = ARGV, io = $stderr) ⇒ Cli

Returns a new instance of Cli.



9
10
11
12
# File 'lib/tara/cli.rb', line 9

def initialize(argv=ARGV, io=$stderr)
  @argv = argv
  @io = io
end

Instance Method Details

#runObject



14
15
16
17
18
19
20
# File 'lib/tara/cli.rb', line 14

def run
  Archive.new(parse_argv).create
  0
rescue => e
  @io.puts(%(Error during packaging: #{e.message} (#{e.class})))
  1
end