I think you will need to do:
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'personal_access_token'
end
workspace = client.workspaces.find_by_id(12)
client.tasks.create_in_workspace(workspace: workspace.id, options: {}, **data)
You can directly pass in a workspace id if you know it before hand. options
is a hash of request I/O options and data
is a hash of attributes to post.
You can look into the documentation for more details on them.
You can also look at this official Hello World example in Ruby that does not use any SDK.