# File rss/maker/taxonomy.rb, line 51
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(" 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
def taxo_topic
@taxo_topics[0] and @taxo_topics[0].value
end
def taxo_topic=(new_value)
@taxo_topic[0] = self.class::TaxonomyTopic.new(self)
@taxo_topic[0].value = new_value
end
", __FILE__, __LINE__ + 1)
end
# File rss/maker/taxonomy.rb, line 77
def self.install_taxo_topic(klass)
klass.module_eval(" class TaxonomyTopics < TaxonomyTopicsBase
class TaxonomyTopic < TaxonomyTopicBase
DublinCoreModel.install_dublin_core(self)
TaxonomyTopicsModel.install_taxo_topics(self)
def to_rss(rss, current)
if current.respond_to?(:taxo_topics)
topic = current.class::TaxonomyTopic.new(value)
topic.taxo_link = value
taxo_topics.to_rss(rss, topic) if taxo_topics
current.taxo_topics << topic
setup_other_elements(rss)
end
end
def current_element(rss)
super.taxo_topics.last
end
end
end
", *Utils.get_file_and_line_from_caller(1))
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.