Exploring patterns in ruby programming language