If you give me a number, which is any year from Dr. Cham’s life, I’ll give you a synopsis of that time period. And I’ll do it as a Ruby method, so it’s an independent piece, an isolated chunk of code which can be hooked up to the voice of a robotic volcano, when such a thing becomes the apex of authoritative voice talents.
Okay, so I need you to notice def and case and when. You’ve seen the Ranges, the closed accordions of 1895..1913, back in chapter 3. They contain both ends and in between. And the backslashes at the end of each line simply ignore the Enter key at the end of each line, assuring Ruby that there is more of this line to come.
So, please: def and case and when.
def dr_chams_timeline( year ) case year when 1894 "Born." when 1895..1913 "Childhood in Lousville, Winston Co., Mississippi." when 1914..1919 "Worked at a pecan nursery; punched a Quaker." when 1920..1928 "Sailed in the Brotherhood of River Wisdomming, which journeyed \ the Mississippi River and engaged in thoughtful self-improvement, \ where he finished 140 credit hours from their Oarniversity." when 1929 "Returned to Louisville to pen a novel about time-travelling pheasant hunters." when 1930..1933 "Took up a respectable career insuring pecan nurseries. Financially stable, he \ spent time in Brazil and New Mexico, buying up rare paper-shell pecan trees. Just \ as his notariety came to a crescendo: gosh, he tried to buried himself alive." when 1934 "Went back to writing his novel. Changed the hunters to insurance tycoons and the \ pheasants to Quakers." when 1935..1940 "Took Arthur Cone, the Headmaster of the Brotherhood of River Wisdomming, as a \ houseguest. Together for five years, engineering and inventing." when 1941 "And this is where things got interesting." end end
from why’s (pungent) guide to Ruby