Dino Dex First Refactor

Let me know when you have a few minutes.  I want to go over a few of the questions you had which I haven't yet done anything with.
I only wrote the Main class as a demonstration of the tests.  It's not
meant to be a class I was designing for any purpose.

*Jeremy Finzel*

*Senior Database Developer*
*M* 630-777-4520




On Thu, Dec 18, 2014 at 1:59 PM, zsyed1 <notifications@github.com> wrote:
>
> In dino_catalog/main.rb
> <https://github.com/jmmastey/level_up_exercises/pull/353#discussion-diff-22067041>
> :
>
> > +  dino_info.filter_dinosaurs("==" => { period: 'Cretaceous' })
> > +  puts 'PERIOD'
> > +  dino_info.dinosaurs_filtered.each { |dinosaur| puts "#{dinosaur.inspect}" }
> > +
> > +  # Big and small
> > +  dino_info.filter_dinosaurs(">" => { weight_in_lbs: 4000 })
> > +  puts 'BIG'
> > +  dino_info.dinosaurs_filtered.each do |dinosaur|
> > +    puts "#{dinosaur.inspect}, @period_type=#{dinosaur.period_type}"
> > +  end
> > +
> > +  # Print individual dino info
> > +  puts dino_info.to_s
> > +  puts dino_info.to_s(true)
> > +  puts dino_info.to_json
> > +end
>
> You should split these up into methods. 30 consecutive lines of
> instructions usually means you're doing too much. Also you will see
> commonalities between those methods and then refactor to reduce repetition.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jmmastey/level_up_exercises/pull/353/files#r22067041>.
>