Module: Scorm2004::Manifest

Defined in:
lib/scorm2004/manifest.rb,
lib/scorm2004/manifest/map.rb,
lib/scorm2004/manifest/data.rb,
lib/scorm2004/manifest/file.rb,
lib/scorm2004/manifest/href.rb,
lib/scorm2004/manifest/item.rb,
lib/scorm2004/manifest/error.rb,
lib/scorm2004/manifest/title.rb,
lib/scorm2004/manifest/schema.rb,
lib/scorm2004/manifest/children.rb,
lib/scorm2004/manifest/manifest.rb,
lib/scorm2004/manifest/map_info.rb,
lib/scorm2004/manifest/resource.rb,
lib/scorm2004/manifest/xml_base.rb,
lib/scorm2004/manifest/objective.rb,
lib/scorm2004/manifest/resources.rb,
lib/scorm2004/manifest/text_node.rb,
lib/scorm2004/manifest/attributes.rb,
lib/scorm2004/manifest/dependency.rb,
lib/scorm2004/manifest/hide_lmsui.rb,
lib/scorm2004/manifest/objectives.rb,
lib/scorm2004/manifest/sequencing.rb,
lib/scorm2004/manifest/rollup_rule.rb,
lib/scorm2004/manifest/rule_action.rb,
lib/scorm2004/manifest/control_mode.rb,
lib/scorm2004/manifest/decimal_node.rb,
lib/scorm2004/manifest/organization.rb,
lib/scorm2004/manifest/presentation.rb,
lib/scorm2004/manifest/rollup_rules.rb,
lib/scorm2004/manifest/data_from_lms.rb,
lib/scorm2004/manifest/organizations.rb,
lib/scorm2004/manifest/rollup_action.rb,
lib/scorm2004/manifest/schemaversion.rb,
lib/scorm2004/manifest/condition_rule.rb,
lib/scorm2004/manifest/rule_condition.rb,
lib/scorm2004/manifest/adlseq_map_info.rb,
lib/scorm2004/manifest/rule_conditions.rb,
lib/scorm2004/manifest/visitor_pattern.rb,
lib/scorm2004/manifest/adlseq_objective.rb,
lib/scorm2004/manifest/limit_conditions.rb,
lib/scorm2004/manifest/rollup_condition.rb,
lib/scorm2004/manifest/sequencing_rules.rb,
lib/scorm2004/manifest/adlseq_objectives.rb,
lib/scorm2004/manifest/delivery_controls.rb,
lib/scorm2004/manifest/primary_objective.rb,
lib/scorm2004/manifest/rollup_conditions.rb,
lib/scorm2004/manifest/time_limit_action.rb,
lib/scorm2004/manifest/completion_threshold.rb,
lib/scorm2004/manifest/navigation_interface.rb,
lib/scorm2004/manifest/rollup_considerations.rb,
lib/scorm2004/manifest/sequencing_collection.rb,
lib/scorm2004/manifest/min_normalized_measure.rb,
lib/scorm2004/manifest/randomization_controls.rb,
lib/scorm2004/manifest/constrained_choice_considerations.rb

Defined Under Namespace

Modules: Attributes, Children, DecimalNode, Href, TextNode, VisitorPattern, XmlBase Classes: AdlseqMapInfo, AdlseqObjective, AdlseqObjectives, CompletionThreshold, ConditionRule, ConstrainedChoiceConsiderations, ControlMode, Data, DataFromLms, DeliveryControls, Dependency, Error, File, HideLmsui, Item, LimitConditions, Manifest, Map, MapInfo, MinNormalizedMeasure, NavigationInterface, Objective, Objectives, Organization, Organizations, Presentation, PrimaryObjective, RandomizationControls, Resource, Resources, RollupAction, RollupCondition, RollupConditions, RollupConsiderations, RollupRule, RollupRules, RuleAction, RuleCondition, RuleConditions, Schema, Schemaversion, Sequencing, SequencingCollection, SequencingRules, TimeLimitAction, Title

Constant Summary collapse

NS =
{
  'imscp'  => "http://www.imsglobal.org/xsd/imscp_v1p1",
  'adlcp'  => "http://www.adlnet.org/xsd/adlcp_v1p3",
  'adlseq' => "http://www.adlnet.org/xsd/adlseq_v1p3",
  'adlnav' => "http://www.adlnet.org/xsd/adlnav_v1p3",
  'imsss'  => "http://www.imsglobal.org/xsd/imsss"
}

Class Method Summary collapse

Class Method Details

.parse(manifest_file) ⇒ Scorm2004::Manifest::Manifest

Parse and validate a manifest file

Parameters:

  • manifest_file (String, IO)

    manifest_file may be a String, or any object that responds to read and close such as an IO, or StringIO.

Returns:

Raises:

  • This method raises an instance of Scorm2004::Manifest::Error’s subclass if validation fails.

See Also:



92
93
94
95
# File 'lib/scorm2004/manifest.rb', line 92

def self.parse(*args)
  manifest_visitor = Scorm2004::Manifest::Manifest.new
  Nokogiri::XML(*args) { |config| config.strict.noent }.root.accept manifest_visitor
end