lib/scorm/manifest.rb
# Versions of the SCORM standard that is supported when running in
# strict mode. When not running in strict mode, the library will not
# care about the version specified in the package manifest and will
# simply try its best to parse the information that it finds.
Versions of the SCORM standard that is supported when running in
strict mode. When not running in strict mode, the library will not
care about the version specified in the package manifest and will
simply try its best to parse the information that it finds.
Versions of the SCORM standard that is supported when running in strict mode . When not running in strict mode the library will not care about the version specified in the package manifest and will simply try its best to parse the information that it finds .
def resources(options = nil)
      if (options.nil?) || (!options.is_a?(Hash))
        @resources.values
      else
        subset = @resources.values
        if options[:id]
          subset = subset.find_all {|r| r.id == options[:id].to_s }
        end
        if options[:type]
          subset = subset.find_all {|r| r.type == options[:type].to_s }
        end
        if options[:scorm_type]
          subset = subset.find_all {|r| r.scorm_type == options[:scorm_type].to_s }
        end
        if options[:href]
          subset = subset.find_all {|r| r.href == options[:href].to_s }
        end
        if options[:with_file]
          subset = subset.find_all {|r| r.files.include?(options[:with_file].to_s) }
        end
        subset
      end
    end
def resources ( options = nil ) if ( options . nil? ) || ( ! options . is_a? ( Hash ) ) @resources . values else subset = @resources . values if options [ :id ] subset = subset . find_all { | r | r . id == options [ :id ] . to_s } end if options [ :type ] subset = subset . find_all { | r | r . type == options [ :type ] . to_s } end if options [ :scorm_type ] subset = subset . find_all { | r | r . scorm_type == options [ :scorm_type ] . to_s } end if options [ :href ] subset = subset . find_all { | r | r . href == options [ :href ] . to_s } end if options [ :with_file ] subset = subset . find_all { | r | r . files . include? ( options [ :with_file ] . to_s ) } end subset end end
Versions of the SCORM standard that is supported when running in
strict mode.
Versions of the SCORM standard that is supported when running in strict mode .
options
<not_specific>