Class: RSS::Maker::RSS09::Channel

Inherits:
ChannelBase show all
Defined in:
lib/rss/maker/0.9.rb,
lib/rss/maker/image.rb,
lib/rss/maker/taxonomy.rb,
lib/rss/maker/dublincore.rb

Direct Known Subclasses

RSS::Maker::RSS20::Channel

Defined Under Namespace

Classes: Categories, Cloud, ImageFavicon, SkipDays, SkipHours

Instance Method Summary collapse

Methods inherited from ChannelBase

#current_element

Methods included from SyndicationModel

append_features

Methods included from DublinCoreModel

append_features, install_dublin_core

Methods included from TaxonomyTopicsModel

append_features, install_taxo_topics

Methods included from ImageFaviconModel

append_features

Methods included from Base

append_features, #initialize

Instance Method Details

#have_required_values?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/rss/maker/0.9.rb', line 44

def have_required_values?
  @title and @link and @description and @language
end

#to_rss(rss) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rss/maker/0.9.rb', line 25

def to_rss(rss)
  channel = Rss::Channel.new
  set = setup_values(channel)
  if set
    rss.channel = channel
    setup_items(rss)
    setup_image(rss)
    setup_textinput(rss)
    setup_other_elements(rss)
    if rss.channel.image
      rss
    else
      nil
    end
  elsif variable_is_set?
    raise NotSetError.new("maker.channel", not_set_required_variables)
  end
end