Module RSS::SlashModel
In: lib/rss/slash.rb

Methods

Constants

ELEMENT_INFOS = \ [ ["section"], ["department"], ["comments", :positive_integer], ["hit_parade", :csv_integer], ]

Public Class methods

[Source]

    # File lib/rss/slash.rb, line 21
21:       def append_features(klass)
22:         super
23: 
24:         return if klass.instance_of?(Module)
25:         klass.install_must_call_validator(SLASH_PREFIX, SLASH_URI)
26:         ELEMENT_INFOS.each do |name, type, *additional_infos|
27:           full_name = "#{SLASH_PREFIX}_#{name}"
28:           klass.install_text_element(full_name, SLASH_URI, "?",
29:                                      full_name, type, name)
30:         end
31: 
32:         klass.module_eval do
33:           alias_method(:slash_hit_parades, :slash_hit_parade)
34:           undef_method(:slash_hit_parade)
35:           alias_method(:slash_hit_parade, :slash_hit_parade_content)
36:         end
37:       end

[Validate]