Class: Moodle2CC::CanvasCC::CanvasExportWriter

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

Constant Summary collapse

CANVAS_EXPORT_FILE =
'canvas_export.txt'

Instance Method Summary collapse

Constructor Details

#initialize(work_dir) ⇒ CanvasExportWriter

Returns a new instance of CanvasExportWriter.



6
7
8
# File 'lib/moodle2cc/canvas_cc/canvas_export_writer.rb', line 6

def initialize(work_dir)
  @work_dir = work_dir
end

Instance Method Details

#writeObject



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

def write
  File.open(File.join(@work_dir, Moodle2CC::CanvasCC::CartridgeCreator::COURSE_SETTINGS_DIR, CANVAS_EXPORT_FILE), 'w') do |f|
    f.write("Q: What did the panda say when he was forced out of his natural habitat?\nA: This is un-BEAR-able")
  end
end