class RSS::Maker::Atom::Feed::Channel
Public Instance Methods
have_required_values?()
click to toggle source
Calls superclass method
RSS::Maker::Base#have_required_values?
# File rss-0.3.0/lib/rss/maker/feed.rb, line 45 def have_required_values? super and (!authors.empty? or @maker.items.any? {|item| !item.authors.empty?}) end
to_feed(feed)
click to toggle source
# File rss-0.3.0/lib/rss/maker/feed.rb, line 28 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
Private Instance Methods
_set_default_values(&block)
click to toggle source
Calls superclass method
RSS::Maker::SetupDefaultLanguage#_set_default_values
# File rss-0.3.0/lib/rss/maker/feed.rb, line 74 def _set_default_values(&block) keep = { :id => id, } self.id ||= about super(&block) ensure self.id = keep[:id] end
not_set_required_variables()
click to toggle source
Calls superclass method
RSS::Maker::Base#not_set_required_variables
# File rss-0.3.0/lib/rss/maker/feed.rb, line 64 def not_set_required_variables vars = super if authors.empty? and @maker.items.all? {|item| item.author.to_s.empty?} vars << "author" end vars << "title" unless title {|t| t.have_required_values?} vars end
required_variable_names()
click to toggle source
# File rss-0.3.0/lib/rss/maker/feed.rb, line 52 def required_variable_names %w(id updated) end
variable_is_set?()
click to toggle source
Calls superclass method
RSS::Maker::Base#variable_is_set?
# File rss-0.3.0/lib/rss/maker/feed.rb, line 60 def variable_is_set? super or !authors.empty? end
variables()
click to toggle source
Calls superclass method
RSS::Maker::Base#variables
# File rss-0.3.0/lib/rss/maker/feed.rb, line 56 def variables super + %w(id updated) end