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:
parent
82a90c1b93
commit
623f03adda
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue