Class: Atomizer::Workspace

Inherits:
FeedItem show all
Defined in:
lib/atomizer/workspace.rb

Instance Method Summary collapse

Methods inherited from FeedItem

feed_attributes, feed_no_collection_group_tag, feed_no_collection_group_tag!, feed_tag_name

Methods included from Buildable

#to_atom

Constructor Details

#initialize(*attrs) ⇒ Workspace

Returns a new instance of Workspace.



6
7
8
9
# File 'lib/atomizer/workspace.rb', line 6

def initialize(*attrs)
  super(*attrs)
  @collections ||= []
end

Instance Method Details

#to_xml(xml) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/atomizer/workspace.rb', line 11

def to_xml(xml)
  xml.workspace do
    xml['atom'].title title if title
    collections.each do |collection|
      collection.to_xml xml
    end
  end
end