Class: Moodle2CC::CanvasCC::DiscussionWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/moodle2cc/canvas_cc/discussion_writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(work_dir, *canvas_discussions) ⇒ DiscussionWriter

Returns a new instance of DiscussionWriter.



4
5
6
7
# File 'lib/moodle2cc/canvas_cc/discussion_writer.rb', line 4

def initialize(work_dir, *canvas_discussions)
  @work_dir = work_dir
  @discussions = canvas_discussions
end

Instance Method Details

#writeObject



9
10
11
12
13
14
# File 'lib/moodle2cc/canvas_cc/discussion_writer.rb', line 9

def write
  @discussions.each do |discussion|
    write_discussion(discussion)
    write_meta(discussion)
  end
end