I was working with Ruby and WIN32OLE (which is specifically, Excel).
I found all those enumerable objects, such as Range.Columns, are automatically enumerable in Ruby, and can be iterated using obj.each method.
I am wondering how it works? I understand that if you want to make something enumerable, you have to include "Enumerable"
. But apparently they cannot put that line in the OLE object. Is it just directly mapping obj.each
method to for each
loop?