`each_entry` is listed among the methods provided by Ruby’s `Enumerable` module, but its distinct behavior is not shown here. The iteration contract beneath `Enumerable` is `each`: a class supplies an `each` method that yields items to a block, one at a time. section 10.1
The underlying each pattern
`[1, 2, 3].each { |n| puts n }` hands each number to the block. With a block, array `each` returns the original array; the block’s return values are discarded. Use `map` instead when you need a new array of block results. section 6.3.6 section 10.6.1
Listing 10.1 An Enumerable class and its deployment of the each method
class Rainbow
include Enumerable
def each
yield "red"
yield "orange"
yield "yellow"
yield "green"
yield "blue"
yield "indigo"
yield "violet"
end
end
A custom class can yield its own sequence through `each`. Including `Enumerable` then makes methods built on that iteration available; the listing does not demonstrate a call to `each_entry`. section 10.1
