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