Class: Inscriber::Exporter

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

Class Method Summary collapse

Class Method Details

.export(database) ⇒ Object



4
5
6
7
8
# File 'lib/inscriber/exporter.rb', line 4

def export(database)
  data = { "#{database.source_lang}" => download_from_db(database) }
  File.open("#{database.output_dir}/#{database.file_name}.#{database.source_lang}.yml", "w") { |f| f.write data.to_yaml }
  { status: true }
end