Class: ConceptDocExporter

Inherits:
Object
  • Object
show all
Defined in:
lib/asker/exporter/concept_doc_exporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(concepts) ⇒ ConceptDocExporter

Returns a new instance of ConceptDocExporter.



8
9
10
# File 'lib/asker/exporter/concept_doc_exporter.rb', line 8

def initialize(concepts)
  @concepts = concepts
end

Instance Method Details

#exportObject



12
13
14
15
16
17
18
19
# File 'lib/asker/exporter/concept_doc_exporter.rb', line 12

def export
  file = Project.instance.lessonfile
  @concepts.each do |concept|
    if concept.process
      file.write(ConceptDocFormatter.to_s(concept))
    end
  end
end