Surprised there isn't a better rubyism for this method as a whole.