Using Ruby, how can I perform background and foreground text colorization for output in the terminal?
I remember, when programming Pascal we all used to write our own textcolor(…) procedures to make our small educational programs look more pretty and …
I have a value 'Dog' and an array ['Cat', 'Dog', 'Bird'].
How do I check if it exists in the array without looping through it? Is there a simple way of checking if the value exists, nothing more?