As a programming language, Ruby is often praised for its resemblance to a human language, English. This is a virtue particularly to those of us new to reading and writing in computer languages.
It is similarly praised for its flexibility. There is often more than one way to write a set of instructions. Consider this example that employs the .map method:
array.map do |num|
num * 2
Assuming the above array is an array of integers, this method will return a new array whose elements are the product of multiplying the original elements by…