Class RSS::Rss::Channel::Item::Enclosure
In: rss/0.9.rb
Parent: Element

Methods

new   to_s  

Included Modules

RSS09

Public Class methods

[Source]

# File rss/0.9.rb, line 408
          def initialize(url=nil, length=nil, type=nil)
            super()
            @url = url
            @length = length
            @type = type
          end

Public Instance methods

[Source]

# File rss/0.9.rb, line 415
          def to_s(convert=true, indent=calc_indent)
            if @url and @length and @type
              rv = %Q!<enclosure url="#{h @url}" !
              rv << %Q!length="#{h @length}" type="#{h @type}"/>!
              rv = @converter.convert(rv) if convert and @converter
              rv
            else
              ''
            end
          end

[Validate]