Adding my solution for dinoDex exercise

Sophia, I did not understand what exactly was required out of the question
initially, where the question says the below.  So, I just printed all the
dinosaurs and their period for this particular option.  Now I do understand
that I need to take accurate input and show the dinosaur names accordingly.


   - Grab dinosaurs for specific periods (no need to differentiate between
   Early and Late Cretaceous, btw).




On Mon, Oct 27, 2014 at 9:39 AM, Sophia <notifications@github.com> wrote:

> In dino_catalog/dinoDex.rb:
>
> > +
> > +def grabDinos(dinoarray, qText, hname)
> > +	dinoarray.each do |ff|
> > +		temp = ff[hname]
> > +		if qText == "CARNIVORE"
> > +  		if temp != nil and (temp.upcase == qText or temp.upcase == "INSECTIVORE" or temp.upcase == "PISCIVORE")
> > +							puts ff['name']
> > +			end #  if temp != nil and (temp.upcase == qText or temp.ucase == "INSECTIVORE" or temp.ucase == "PISCIVORE")
> > +		elsif hname == "weight"
> > +			if temp != nil and qText == "BIG" and temp.to_i > 2000
> > +							puts ff['name']
> > +			elsif temp != nil and qText == "SMALL" and temp.to_i < 2000
> > +							puts ff['name']
> > +			end
> > +		elsif qText == "PERIOD"
> > +				puts (ff['name'] + " - " + ff['period'])
>
> why does a period search output the name *and* the period, when all other
> searches only output the dino name?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jmmastey/level_up_exercises/pull/176/files#r19408499>.
>