Sha256: a306e0814cdad7b5473b3be37bc604d1c4b25c42fc77bdf69394d7a7d161edb9
Contents?: true
Size: 453 Bytes
Versions: 4
Compression:
Stored size: 453 Bytes
Contents
require 'helper' class EnrichmentDb::Language::Datum < EnrichmentDb::DatumModel def self.format_result(result) if result.size > 0 puts "Found #{result.size} object/s" result.collect do |h| h.delete('id') h end.sort_by do |h| h['value'] end.each_with_object({}) do |record, h| h[record.fetch('value')] = record.fetch('language') end else puts "Nothing found" end end end
Version data entries
4 entries across 4 versions & 1 rubygems