Ruby is known to be slow, even compared to other interpreted languages like python. It’s sad, but it’s true. Does it bother you?
Enumerations are an elegant way to make your code more readable. Unfortunately, Ruby doesn’t have a built-in enum type. (Don’t stop reading now! This story ends with hapiness and joy)
To access a class method from an instance, you have to use the reference to that class (because that’s where the method resides). The attribute reader that returns that reference is named class