First Dino Dex Program

I have it set up right now to just run the code in the Main class, and it prints the results to the console.
I'm not sure I follow...

*Jeremy Finzel*

*Senior Database Developer*
*M* 630-777-4520




On Tue, Dec 16, 2014 at 8:23 PM, Joseph Mastey <notifications@github.com>
wrote:
>
> In dino_catalog/dinosaur_import.rb
> <https://github.com/jmmastey/level_up_exercises/pull/350#discussion-diff-21948985>
> :
>
> > +      hash = row.to_hash
> > +      hash = self.class.convert_import_hash(hash)
> > +      dinosaurs << Dinosaur.new(hash)
> > +    end
> > +    dinosaurs
> > +  end
> > +
> > +  def self.convert_import_hash(hash)
> > +    hash_converted = {}
> > +    hash.each_pair do |key, value|
> > +      key_converted = self.class.convert_import_keys(key)
> > +      value_converted = self.class.convert_import_values(key_converted, value)
> > +      hash_converted.merge!(key_converted => value_converted)
> > +    end
> > +    hash_converted
> > +  end
>
> Same pattern as above. Switch from .each to .inject, no more local needed.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jmmastey/level_up_exercises/pull/350/files#r21948985>.
>