# File rss/maker/taxonomy.rb, line 8
def self.append_features(klass)
super
klass.add_need_initialize_variable("taxo_topics", "make_taxo_topics")
klass.add_other_element("taxo_topics")
klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
attr_reader :taxo_topics
def make_taxo_topics
self.class::TaxonomyTopics.new(@maker)
end
def setup_taxo_topics(rss, current)
@taxo_topics.to_rss(rss, current)
end
EOC
end
# File rss/maker/taxonomy.rb, line 25
def self.install_taxo_topics(klass)
klass.module_eval(<<-EOC, *Utils.get_file_and_line_from_caller(1))
class TaxonomyTopics < TaxonomyTopicsBase
def to_rss(rss, current)
if current.respond_to?(:taxo_topics)
topics = current.class::TaxonomyTopics.new
bag = topics.Bag
@resources.each do |resource|
bag.lis << RDF::Bag::Li.new(resource)
end
current.taxo_topics = topics
end
end
end
EOC
end