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.
It does assume that.  I was not future-proofing based on any possible
values, only the ones I know about.  Doesn't Enova like that philosophy?
:).  For that reason, unless I know about some other values, at this stage
I don't think there's a need to refactor.  Otherwise, I would have tried to
create something much more robust.  I don't think I would necessarily know
that the last value would always be the period without early/late.  What if
a period was described by two words instead of one?

*Jeremy Finzel*

*Senior Database Developer*
*M* 630-777-4520




On Tue, Dec 16, 2014 at 8:17 PM, Joseph Mastey <notifications@github.com>
wrote:
>
> In dino_catalog/dinosaur.rb
> <https://github.com/jmmastey/level_up_exercises/pull/350#discussion-diff-21948846>
> :
>
> > +
> > +  def initialize(options)
> > +    options.each { |key, value| send("#{key}=", value) }
> > +  end
> > +
> > +  def weight_in_lbs=(weight_in_lbs)
> > +    @weight_in_lbs = weight_in_lbs.to_i
> > +  end
> > +
> > +  def carnivore?
> > +    @carnivore = carnivores.include?(@diet) ? true : false
> > +  end
> > +
> > +  def period_type
> > +    @period_type = period_period_types[@period]
> > +  end
>
> This assumes you know all the possible periods. For instance, I could
> specify "Mid to Late Permian" and you'd be screwed. You're better off even
> just using @period.split(' ').last.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jmmastey/level_up_exercises/pull/350/files#r21948846>.
>