79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/mofo/hentry.rb', line 79
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">
<id>#{first.base_url}</id>
<link type="text/html" href="#{first.base_url}" rel="alternate"/>
<title>#{options[:title]}</title>
<updated>#{(first.updated || first.published).try(:xmlschema)}</updated>
#{entries}
</feed>
end_atom
end
|