class AtomIshWriter

Attributes

title[RW]
updated[RW]

Public Class Methods

new() click to toggle source
# File lib/feed_ninja/atomish.rb, line 3
def initialize
  @entries = []
end

Public Instance Methods

new_entry(index) { |item| ... } click to toggle source
# File lib/feed_ninja/atomish.rb, line 7
def new_entry(index)
  item = Entry.new
  item = yield item
  @entries[index] = item
end
to_s() click to toggle source
# File lib/feed_ninja/atomish.rb, line 13
  def to_s
    %{<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>#{@title}</title>
  <id>#{@link}</id>
  <link href="#{@link}"/>
  <updated>#{@updated}</updated>
  <author>
    <name>FeedNinja</name>
    <uri>http://github.com/Tourniquet/feedninja</uri>
    <email>latzer.daniel@gmail.com</email>
  </author>
    #{@entries.inject { |memo, entry| memo.to_s + entry.to_s }.to_s}</feed>}

  end