Option pattern in Ruby
Have you ever seen this when coding Ruby?
NoMethodError: undefined method `[]' for nil:NilClass
I bet you have, many times—way too many. However, it doesn’t have to be so. There’s a pattern that helps you to get rid errors when handling…