Class: Scorm::Command::Extract

Inherits:
Base
  • Object
show all
Defined in:
lib/scorm/commands/extract.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #autodetected_package

Instance Method Summary collapse

Methods inherited from Base

#display, #error, #extract_option, #extract_package, #initialize

Constructor Details

This class inherits a constructor from Scorm::Command::Base

Instance Method Details

#indexObject

Raises:


3
4
5
6
7
8
9
10
# File 'lib/scorm/commands/extract.rb', line 3

def index
  package = args.shift.strip rescue ''
  raise(CommandFailed, "Invalid package.") if package == ''

  Scorm::Package.open(package, :cleanup => false) do |pkg|
    display "Extracted package to #{pkg.path}"
  end
end