Class: XML::Feed::Builder::Rss::Channels
- Inherits:
-
Object
- Object
- XML::Feed::Builder::Rss::Channels
- Includes:
- Enumerable
- Defined in:
- lib/xml/libxml/feed/builders/rss.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
- #[](x) ⇒ Object
- #create {|node| ... } ⇒ Object
- #each ⇒ Object
-
#initialize(doc) ⇒ Channels
constructor
A new instance of Channels.
Constructor Details
#initialize(doc) ⇒ Channels
Returns a new instance of Channels.
7 8 9 |
# File 'lib/xml/libxml/feed/builders/rss.rb', line 7 def initialize(doc) @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
5 6 7 |
# File 'lib/xml/libxml/feed/builders/rss.rb', line 5 def doc @doc end |
Instance Method Details
#[](x) ⇒ Object
23 24 25 |
# File 'lib/xml/libxml/feed/builders/rss.rb', line 23 def [](x) return Channel.new(@doc, @doc.root.find('/rss/channel').to_a[x]) end |