Skip to content

Instantly share code, notes, and snippets.

@ottaviana
ottaviana / orange_tree.rb
Created January 20, 2017 10:30
orange tree
#orange tree class
# 8 methods to return
# one_year_passes method when called, ages the tree one year.
# my tree grows every years
# after some time he dies
# for the first 2 years doesn't produce fruits
#older trees produce more each year than younger trees...whatever you think makes the
#count_the_oranges (which returns the number of oranges on the tree)
#and pick_an_orange (which reduces the @orange_count by 1 and returns a string
#telling you how delicious the orange was