Class: XML::Feed::Builder::Rss::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/xml/libxml/feed/builders/rss.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc, node = nil) ⇒ Channel

Returns a new instance of Channel.



32
33
34
35
36
# File 'lib/xml/libxml/feed/builders/rss.rb', line 32

def initialize(doc, node=nil)
    @doc = doc
    @node = node
    @node = XML::Node.new("channel") unless @node
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



29
30
31
# File 'lib/xml/libxml/feed/builders/rss.rb', line 29

def doc
  @doc
end

#nodeObject (readonly)

Returns the value of attribute node.



30
31
32
# File 'lib/xml/libxml/feed/builders/rss.rb', line 30

def node
  @node
end

Instance Method Details

#itemsObject Also known as: item



38
39
40
# File 'lib/xml/libxml/feed/builders/rss.rb', line 38

def items
    return Items.new(@doc, @node)
end