initial answer to trinary in ruby