Instance Methods
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/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
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/feed.rb, line 45
def have_required_values?
super and
(!authors.empty? or
@maker.items.any? {|item| !item.authors.empty?})
end
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/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
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/feed.rb, line 52
def required_variable_names
%w(id updated)
end
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/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
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/feed.rb, line 60
def variable_is_set?
super or !authors.empty?
end
No documentation available
lib/rss/maker/feed.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/feed.rb, line 56
def variables
super + %w(id updated)
end
No documentation available