class Entry
Attributes
id[RW]
images[RW]
link[RW]
summary[RW]
title[RW]
updated[RW]
Public Class Methods
new()
click to toggle source
# File lib/feed_ninja/atomish.rb, line 34 def initialize @summary = [] end
Public Instance Methods
content()
click to toggle source
# File lib/feed_ninja/atomish.rb, line 49 def content Array(@images).inject("") do |memo, src| memo += %{ <a href="#{src}"> <img src="#{src}"/> </a> } end + @summary.join("\n") end
to_s()
click to toggle source
# File lib/feed_ninja/atomish.rb, line 38 def to_s %{ <entry> <title>#{@title}</title> <link rel="alternate" type="text/html" href="#{@link}" /> <id>#{@id}</id> <updated>#{@updated}</updated> <content type="html">#{self.content.encode(:xml => :text)}</content> </entry> } end