I'm fairly new to ruby and its rubyisms, I have a code similar to this one :
def my_method objects
temp = []
objects.each do |o|
temp << {
:text => o.text,
:title => o.title
}
end
return temp
end
Could you help me to write this better ? Or show me some sources to learn this kind of rubyisms plz ? I'm already doing the ruby koans lessons.