In Python, we can use the list()
method on an enumerable to create an ordered list based on the enumerator's items. How would you accomplish this in a Ruby enumerable?
This is currently what I'm using, but it feels a bit hack-ish:
data = []
e = # .. enumerable ..
e.each do |d|
data << d
end