Sha256: be4c5b6aab4cc069701a874990657a6198eea1f284d723c11edd279846a6c294

Contents?: true

Size: 689 Bytes

Versions: 6

Compression:

Stored size: 689 Bytes

Contents

# frozen_string_literal: true

require_relative '../formatter/concept_doc_formatter'
require_relative '../version'

##
# Export Concept to Doc file
module ConceptDocExporter
  ##
  # Export array of concepts to doc
  def self.export_all(concepts, project)
    file = File.new(project.get(:lessonpath), 'w')
    file.write('=' * 50 + "\n")
    file.write("Created by : #{Asker::NAME} (version #{Asker::VERSION})\n")
    file.write("File       : #{project.get(:lessonname)}\n")
    file.write("Time       : #{Time.new}\n")
    file.write('=' * 50 + "\n")

    concepts.each do |concept|
      file.write(ConceptDocFormatter.to_s(concept)) if concept.process
    end
    file.close
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asker-tool-2.6.0 lib/asker/exporter/concept_doc_exporter.rb
asker-tool-2.5.9 lib/asker/exporter/concept_doc_exporter.rb
asker-tool-2.5.8 lib/asker/exporter/concept_doc_exporter.rb
asker-tool-2.5.7 lib/asker/exporter/concept_doc_exporter.rb
asker-tool-2.5.6 lib/asker/exporter/concept_doc_exporter.rb
asker-tool-2.5.5 lib/asker/exporter/concept_doc_exporter.rb