class RSS::Maker::RSS10::Channel::Links

Public Instance Methods

to_feed(rss, channel) click to toggle source
# File lib/rss/maker/1.0.rb, line 123
  def to_feed(rss, channel)
    return if @links.empty?
    @links.first.to_feed(rss, channel)
  end

  class Link < LinkBase
    def to_feed(rss, channel)
      if have_required_values?
        channel.link = href
      else
        raise NotSetError.new("maker.channel.link",
                              not_set_required_variables)
      end
    end

    private
    def required_variable_names
      %w(href)
    end
  end
end