I currently have this code
def objects(ids)
array = []
ids.each do |id|
array << object(id) # => #<object[id]>
end
array
end
objects([1, 2, 3])
# => [#<object1>, #<object2>, #<object3>]
It seems like there should be a cleaner way to do this. Can anyone help?
EDIT This is what works
ORIGINAL go this way: