Class: Moodle2CC::Moodle2::Parsers::PageParser
- Inherits:
-
Object
- Object
- Moodle2CC::Moodle2::Parsers::PageParser
- Includes:
- ParserHelper
- Defined in:
- lib/moodle2cc/moodle2/parsers/page_parser.rb
Constant Summary collapse
- PAGE_XML =
'page.xml'
- PAGE_MODULE_NAME =
'page'
Constants included from ParserHelper
Moodle2CC::Moodle2::Parsers::ParserHelper::FILES_XML, Moodle2CC::Moodle2::Parsers::ParserHelper::IMS_FILEBASE_TOKEN, Moodle2CC::Moodle2::Parsers::ParserHelper::MODULE_XML, Moodle2CC::Moodle2::Parsers::ParserHelper::MOODLE_FILEBASE_TOKEN, Moodle2CC::Moodle2::Parsers::ParserHelper::SLASH_TOKEN, Moodle2CC::Moodle2::Parsers::ParserHelper::XML_NULL_VALUE
Instance Method Summary collapse
-
#initialize(backup_dir) ⇒ PageParser
constructor
A new instance of PageParser.
- #parse ⇒ Object
Methods included from ParserHelper
#activity_directories, #parse_boolean, #parse_module, #parse_text
Constructor Details
#initialize(backup_dir) ⇒ PageParser
Returns a new instance of PageParser.
8 9 10 |
# File 'lib/moodle2cc/moodle2/parsers/page_parser.rb', line 8 def initialize(backup_dir) @backup_dir = backup_dir end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 |
# File 'lib/moodle2cc/moodle2/parsers/page_parser.rb', line 12 def parse activity_dirs = activity_directories(@backup_dir, PAGE_MODULE_NAME) activity_dirs.map { |dir| parse_page(dir) } end |