Class: Omnizip::ArchiveCommands

Inherits:
Thor
  • Object
show all
Extended by:
Shared::HelpDispatch
Includes:
Shared
Defined in:
lib/omnizip/cli.rb

Overview

Archive commands subcommand group

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Shared::HelpDispatch

dispatch

Methods included from Shared

#format_bytes, #handle_error

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


128
129
130
# File 'lib/omnizip/cli.rb', line 128

def exit_on_failure?
  true
end

Instance Method Details

#create(output, *inputs) ⇒ Object



214
215
216
217
218
# File 'lib/omnizip/cli.rb', line 214

def create(output, *inputs)
  Omnizip::Commands::ArchiveCreateCommand.new(options).run(output, *inputs)
rescue StandardError => e
  handle_error(e)
end

#extract(archive, output_dir = nil) ⇒ Object



262
263
264
265
266
267
# File 'lib/omnizip/cli.rb', line 262

def extract(archive, output_dir = nil)
  Omnizip::Commands::ArchiveExtractCommand.new(options).run(archive,
                                                            output_dir)
rescue StandardError => e
  handle_error(e)
end

#list(archive) ⇒ Object



296
297
298
299
300
# File 'lib/omnizip/cli.rb', line 296

def list(archive)
  Omnizip::Commands::ArchiveListCommand.new(options).run(archive)
rescue StandardError => e
  handle_error(e)
end

#metadata(archive, pattern = nil) ⇒ Object



342
343
344
345
346
# File 'lib/omnizip/cli.rb', line 342

def (archive, pattern = nil)
  Omnizip::Commands::MetadataCommand.new(options).run(archive, pattern)
rescue StandardError => e
  handle_error(e)
end

#repair(archive, output) ⇒ Object



365
366
367
368
369
# File 'lib/omnizip/cli.rb', line 365

def repair(archive, output)
  Omnizip::Commands::ArchiveRepairCommand.new(options).run(archive, output)
rescue StandardError => e
  handle_error(e)
end

#verify(archive) ⇒ Object



353
354
355
356
357
# File 'lib/omnizip/cli.rb', line 353

def verify(archive)
  Omnizip::Commands::ArchiveVerifyCommand.new(options).run(archive)
rescue StandardError => e
  handle_error(e)
end