lib/vs_scorm/package.rb
# Extracts the content of the package to the course repository.
Extracts the content of the package to the course repository.
Extracts the content of the package to the course repository .
def extract!
      FileUtils.mkdir_p(@path)
      Zip::File::foreach(@package) do |entry|
        entry_path = File.join(@path, entry.name)
        entry_dir = File.dirname(entry_path)
        FileUtils.mkdir_p(entry_dir) unless File.exists?(entry_dir)
        entry.extract(entry_path)
      end
    end
def extract! FileUtils . mkdir_p ( @path ) Zip :: File :: foreach ( @package ) do | entry | entry_path = File . join ( @path , entry . name ) entry_dir = File . dirname ( entry_path ) FileUtils . mkdir_p ( entry_dir ) unless File . exists? ( entry_dir ) entry . extract ( entry_path ) end end
Extracts the content of the package to the course repository.
Extracts the content of the package to the course repository .
# Create the path to the course