Class: Hash

Inherits:
Object show all
Defined in:
lib/import_everything/ext.rb,
lib/import_everything/ext.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_keys_and_values(ks, vs) ⇒ Object



34
35
36
37
# File 'lib/import_everything/ext.rb', line 34

def self.from_keys_and_values(ks,vs)
  raise "size not equal #{ks.size} #{vs.size}" unless ks.size == vs.size
  ks.zip(vs).inject({}) { |h,a| h.merge(a[0] => a[1]) }
end

Instance Method Details

#cleaned_hash_valuesObject



80
81
82
# File 'lib/import_everything/ext.rb', line 80

def cleaned_hash_values
  map_value { |v| v.fixed_obj }
end