Class: Moodle2CC::Moodle2::Parsers::SectionParser
- Inherits:
-
Object
- Object
- Moodle2CC::Moodle2::Parsers::SectionParser
- Includes:
- ParserHelper
- Defined in:
- lib/moodle2cc/moodle2/parsers/section_parser.rb
Constant Summary collapse
- SECTION_XML =
'section.xml'
Constants included from ParserHelper
ParserHelper::FILES_XML, ParserHelper::IMS_FILEBASE_TOKEN, ParserHelper::MODULE_XML, ParserHelper::MOODLE_FILEBASE_TOKEN, ParserHelper::SLASH_TOKEN, ParserHelper::XML_NULL_VALUE
Instance Method Summary collapse
-
#initialize(backup_dir) ⇒ SectionParser
constructor
A new instance of SectionParser.
- #parse ⇒ Object
Methods included from ParserHelper
#activity_directories, #parse_boolean, #parse_module, #parse_text
Constructor Details
#initialize(backup_dir) ⇒ SectionParser
Returns a new instance of SectionParser.
7 8 9 |
# File 'lib/moodle2cc/moodle2/parsers/section_parser.rb', line 7 def initialize(backup_dir) @backup_dir = backup_dir end |
Instance Method Details
#parse ⇒ Object
11 12 13 |
# File 'lib/moodle2cc/moodle2/parsers/section_parser.rb', line 11 def parse section_directories.each_with_index.map { |section, i| parse_section(section, i) } end |