lib/volt/page/tasks.rb
# When a request is sent to the backend, it can attach a callback,
# this is called from the backend to pass to the callback.
When a request is sent to the backend, it can attach a callback,
this is called from the backend to pass to the callback.
When a request is sent to the backend it can attach a callback this is called from the backend to pass to the callback .
def response(callback_id, result, error)
    callback = @callbacks.delete(callback_id)
    if callback
      if error
        puts "Task Response: #{error.inspect}"
      else
        callback.call(result)
      end
    end
  end
def response ( callback_id , result , error ) callback = @callbacks . delete ( callback_id ) if callback if error puts "Task Response: #{error.inspect}" else callback . call ( result ) end end end
When a request is sent to the backend, it can attach a callback,
this is called from the backend to pass to the callback.
When a request is sent to the backend it can attach a callback this is called from the backend to pass to the callback .
# TODO: full error handling
callback_id
result
error