Created
April 14, 2010 00:06
-
-
Save kyleslattery/365267 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Viddler | |
class Request | |
private | |
def parse_response(raw_response) | |
raise EmptyResponseError if raw_response.blank? | |
response_hash = Hash.from_xml(raw_response.to_s) | |
if response_error = response_hash['error'] | |
raise ResponseError.new(viddler_error_message(response_error)) | |
end | |
response_hash | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment