I'm trying to update code for importing trello cards to asana, and I had to update to the latest asana gem https://github.com/Asana/ruby-asana.
Now I'm getting this error when I'm trying to access a collection item by index.
exportTrelloToAsana.rb:63:in `block in <main>': undefined method `[]' for #<Asana::Resources::Collection:0x007fbba1d0d810> (NoMethodError)
from exportTrelloToAsana.rb:56:in `each'
from exportTrelloToAsana.rb:56:in `<main>'
What is the correct syntax for accessing a Asana::Resources::Collection by index?
client = Asana::Client.new do |c|
c.authentication :access_token, PERSONAL_ACCESS_TOKEN
end
workspaces = client.workspaces.find_all
workspace = workspaces[0]