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")
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<feed xml:lang=\"en-US\" xmlns=\"http://www.w3.org/2005/Atom\">\n<id>\#{first.base_url}</id>\n<link type=\"text/html\" href=\"\#{first.base_url}\" rel=\"alternate\"/>\n<title>\#{options[:title]}</title>\n<updated>\#{(first.updated || first.published).try(:xmlschema)}</updated>\n\#{entries}\n</feed>\n end_atom\nend\n"
|