lib/vs_scorm/package.rb
# Returns an array with the paths to all the files in the package.
Returns an array with the paths to all the files in the package.
Returns an array with the paths to all the files in the package .
def files
      if File.directory?(@package)
        Dir.glob(File.join(File.join(File.expand_path(@package), '**'), '*')).reject {|f|
          File.directory?(f) }.map {|f| f.sub(/^#{File.expand_path(@package)}\/?/, '') }
      else
        entries = []
        Zip::File::foreach(@package) do |entry|
          entries << entry.name unless entry.name[-1..-1] == '/'
        end
        entries
      end
    end
def files if File . directory? ( @package ) Dir . glob ( File . join ( File . join ( File . expand_path ( @package ) , '**' ) , '*' ) ) . reject { | f | File . directory? ( f ) } . map { | f | f . sub ( / ^ #{ File . expand_path ( @package ) } \/ ? / , '' ) } else entries = [ ] Zip :: File :: foreach ( @package ) do | entry | entries << entry . name unless entry . name [ - 1 .. - 1 ] == '/' end entries end end
Returns an array with the paths to all the files in the package.
Returns an array with the paths to all the files in the package .