Class RSS::Rss
In: rss/trackback.rb
rss/2.0.rb
rss/0.9.rb
Parent: Object

Methods

image   items   new   textinput   to_s  

Included Modules

RSS09 RootElementMixin XMLStyleSheetMixin

Classes and Modules

Class RSS::Rss::Channel

Attributes

encoding  [RW] 
rss_version  [RW] 
standalone  [RW] 
version  [RW] 

Public Class methods

[Source]

# File rss/0.9.rb, line 34
    def initialize(rss_version, version=nil, encoding=nil, standalone=nil)
      super
    end

Public Instance methods

[Source]

# File rss/0.9.rb, line 46
    def image
      if @channel
        @channel.image
      else
        nil
      end
    end

[Source]

# File rss/0.9.rb, line 38
    def items
      if @channel
        @channel.items
      else
        []
      end
    end

[Source]

# File rss/0.9.rb, line 54
    def textinput
      if @channel
        @channel.textInput
      else
        nil
      end
    end

[Source]

# File rss/0.9.rb, line 62
    def to_s(convert=true, indent=calc_indent)
      next_indent = indent + INDENT
      rv = "\#{xmldecl}\n\#{xml_stylesheet_pi}\n\#{indent}<rss version=\"\#{@rss_version}\"\#{ns_declaration(next_indent)}>\n\#{channel_element(false, next_indent)}\n\#{other_element(false, next_indent)}\n\#{indent}</rss>\n"
      rv = @converter.convert(rv) if convert and @converter
      remove_empty_newline(rv)
    end

[Validate]