class Inscriber::Exporter
Public Class Methods
export(database)
click to toggle source
# 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
Private Class Methods
download_from_db(database)
click to toggle source
# File lib/inscriber/exporter.rb, line 12 def download_from_db(database) Inscriber::Downloader.new(database).download end