lib/httparty/parser.rb in httparty-0.5.0 vs lib/httparty/parser.rb in httparty-0.5.1
- old
+ new
@@ -56,10 +56,11 @@
# The intended parsing format for the request
# @return [Symbol] e.g. :json
attr_reader :format
+ # Instantiate the parser and call {#parse}.
# @param [String] body the response body
# @param [Symbol] format the response format
# @return parsed response
def self.call(body, format)
new(body, format).parse
@@ -131,10 +132,10 @@
self.class.supports_format?(format)
end
def parse_supported_format
send(format)
- rescue NoMethodError
- raise NotImplementedError, "#{self.class.name} has not implemented a parsing method for the #{format.inspect} format."
+ rescue NoMethodError
+ raise NotImplementedError, "#{self.class.name} has not implemented a parsing method for the #{format.inspect} format."
end
end
end