Class: RSS::Maker::Atom::Feed::Channel

Inherits:
ChannelBase show all
Includes:
SetupDefaultLanguage
Defined in:
lib/rss/maker/feed.rb

Defined Under Namespace

Classes: Categories, Cloud, Generator, Links, SkipDays, SkipHours

Constant Summary

Constants inherited from Base

Base::NEED_INITIALIZE_VARIABLES, Base::OTHER_ELEMENTS

Instance Attribute Summary

Attributes inherited from Base

#maker

Instance Method Summary collapse

Methods inherited from ChannelBase

#date=, #icon, #icon=, #lastBuildDate=, #logo, #logo=, #pubDate, #pubDate=, #updated, #updated=

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 ITunesChannelModel

append_features

Methods included from ITunesBaseModel

#def_class_accessor, #def_csv_accessor, #def_elements_class_accessor, #def_yes_clean_other_accessor, #def_yes_other_accessor

Methods included from ImageFaviconModel

append_features, install_image_favicon

Methods inherited from Base

add_need_initialize_variable, add_other_element, def_array_element, def_classed_element, def_classed_element_without_accessor, def_classed_elements, def_csv_element, def_other_element, def_other_element_without_accessor, inherited, inherited_base, #initialize, need_initialize_variables, other_elements

Methods included from Utils::InheritedReader

#inherited_array_reader, #inherited_hash_reader, #inherited_reader

Constructor Details

This class inherits a constructor from RSS::Maker::Base

Instance Method Details

#have_required_values?Boolean

Returns:

  • (Boolean)


44
45
46
47
48
# File 'lib/rss/maker/feed.rb', line 44

def have_required_values?
  super and
    (!authors.empty? or
     @maker.items.any? {|item| !item.authors.empty?})
end

#to_feed(feed) ⇒ Object



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

def to_feed(feed)
  set_default_values do
    setup_values(feed)
    feed.dc_dates.clear
    setup_other_elements(feed)
    if image_favicon.about
      icon = feed.class::Icon.new
      icon.content = image_favicon.about
      feed.icon = icon
    end
    unless have_required_values?
      raise NotSetError.new("maker.channel",
                            not_set_required_variables)
    end
  end
end