lib/qualtrics/response.rb in qualtrics-0.5.4 vs lib/qualtrics/response.rb in qualtrics-0.5.5
- old
+ new
@@ -3,20 +3,24 @@
module Qualtrics
class Response
def initialize(raw_response)
@raw_response = raw_response
- if @raw_response.status != 200
+ if status != 200
raise Qualtrics::ServerErrorEncountered, error_message
end
end
def success?
body['Meta'].nil? ? false : body['Meta']['Status'] == 'Success'
end
def result
body['Result'].nil? ? {} : body['Result']
+ end
+
+ def status
+ @raw_response.status
end
protected
def body