1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Use sanctioned formats interface in example

This commit is contained in:
Sandro Turriate 2009-12-07 00:44:24 -05:00
parent 82a90c1b93
commit 623f03adda

View file

@ -3,9 +3,7 @@ class ParseAtom
# Support Atom along with the default parsers: xml, json, yaml, etc.
class Parser::Atom < HTTParty::Parser
def self.formats
super.merge({"application/atom+xml" => :atom})
end
SupportedFormats.merge!({"application/atom+xml" => :atom})
protected
@ -24,9 +22,7 @@ class OnlyParseAtom
# Only support Atom
class Parser::OnlyAtom < HTTParty::Parser
def self.formats
{"application/atom+xml" => :atom}
end
SupportedFormats = {"application/atom+xml" => :atom}
protected