Class: N42translation::CSVConvert
- Inherits:
-
Object
- Object
- N42translation::CSVConvert
- Defined in:
- lib/n42translation/csv_convert.rb
Class Method Summary collapse
Class Method Details
.createCSV(language_hashes, langs, default_yml, default_language) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/n42translation/csv_convert.rb', line 5 def self.createCSV(language_hashes, langs, default_yml, default_language) keys = language_hashes.dup.map do |lang, lang_hash| lang_hash.keys end.flatten.uniq rows = [] rows << ["key",langs].flatten keys.each do |key| rows << [ key, get_values_from_key(language_hashes, key, default_yml, default_language) ].flatten end rows end |