- get '/answer' do
- code, body = http_get( 'http://some.data.from.google.analytics.api' )
- if 200 == code
- data_points = parse_xml( body )
- answer = calc_answer( data_points )
- # render a view with the answer
- else
- # render a view with the error code
- end
- end