Class: Moodle2CC::CanvasCC::PageWriter
- Inherits:
-
Object
- Object
- Moodle2CC::CanvasCC::PageWriter
- Defined in:
- lib/moodle2cc/canvas_cc/page_writer.rb
Instance Method Summary collapse
-
#initialize(work_dir, *pages) ⇒ PageWriter
constructor
A new instance of PageWriter.
- #write ⇒ Object
Constructor Details
#initialize(work_dir, *pages) ⇒ PageWriter
Returns a new instance of PageWriter.
4 5 6 7 |
# File 'lib/moodle2cc/canvas_cc/page_writer.rb', line 4 def initialize(work_dir, *pages) @work_dir = work_dir @pages = pages end |
Instance Method Details
#write ⇒ Object
9 10 11 12 |
# File 'lib/moodle2cc/canvas_cc/page_writer.rb', line 9 def write Dir.mkdir(File.join(@work_dir, Moodle2CC::CanvasCC::Models::Page::WIKI_CONTENT)) @pages.each { |page| write_html(page) } end |