52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/mofo/hentry.rb', line 52
def to_atom(options = {})
entries = map { |entry| entry.try(:to_atom) }.compact.join("\n")
<<-end_atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
#{first.atom_id}
<link type="text/html" href="#{first.base_url}" rel="alternate"/>
<link type="application/atom+xml" href="" rel="self"/>
<title>#{options[:title]}</title>
<updated>#{(first.updated || first.published).try(:xmlschema)}</updated>
#{entries}
</feed>
end_atom
end
|