Module: RSS::Maker::TaxonomyTopicModel
- Included in:
- RSSBase
- Defined in:
- lib/rss/maker/taxonomy.rb
Defined Under Namespace
Classes: TaxonomyTopicsBase
Class Method Summary
collapse
Class Method Details
.append_features(klass) ⇒ Object
41
42
43
44
45
46
|
# File 'lib/rss/maker/taxonomy.rb', line 41
def self.append_features(klass)
super
class_name = "TaxonomyTopics"
klass.def_classed_elements("#{TAXO_PREFIX}_topic", "value", class_name)
end
|
.install_taxo_topic(klass) ⇒ Object
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/rss/maker/taxonomy.rb', line 48
def self.install_taxo_topic(klass)
klass.module_eval(" class TaxonomyTopics < TaxonomyTopicsBase\n class TaxonomyTopic < TaxonomyTopicBase\n DublinCoreModel.install_dublin_core(self)\n TaxonomyTopicsModel.install_taxo_topics(self)\n\n def to_feed(feed, current)\n if current.respond_to?(:taxo_topics)\n topic = current.class::TaxonomyTopic.new(value)\n topic.taxo_link = value\n taxo_topics.to_feed(feed, topic) if taxo_topics\n current.taxo_topics << topic\n setup_other_elements(feed, topic)\n end\n end\n end\n end\n", __FILE__, __LINE__ + 1)
end
|