module ConceptAIGiftExporter
Export ConceptIA data to gift to outputfile
Public Class Methods
export_all(concepts_ai, project)
click to toggle source
Private Class Methods
export(concept_ai, project)
click to toggle source
Export 1 concept_ai from project @param concept_ai (ConceptAI
) @param project (Project
) rubocop:disable Metrics/AbcSize
# File lib/asker/exporter/concept_ai_gift_exporter.rb, line 21 def self.export(concept_ai, project) return unless concept_ai.process? file = project.get(:outputfile) file.write head(concept_ai.name) Application.instance.config['questions']['stages'].each do |stage| concept_ai.questions[stage].each do |question| file.write(QuestionGiftFormatter.to_s(question)) end end end
head(name)
click to toggle source
Convert Concept
name into gift format head @param name (String) @return String
# File lib/asker/exporter/concept_ai_gift_exporter.rb, line 38 def self.head(name) s = "\n" s += '// ' + '=' * 50 + "\n" s += "// Concept name: #{name}\n" s += '// ' + '=' * 50 + "\n" s end