1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rss/*: refactored.

- gave a name to 'x'.
  - undef_method -> remove_method for avoiding a warning in ruby 1.6.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2005-04-05 07:03:43 +00:00
parent 56ce2994de
commit 5f3a36794a
12 changed files with 147 additions and 141 deletions

View file

@ -17,16 +17,16 @@ module RSS
super
klass.module_eval(<<-EOC, *get_file_and_line_from_caller(1))
%w(encoded).each do |x|
install_text_element("\#{CONTENT_PREFIX}_\#{x}")
%w(encoded).each do |name|
install_text_element("\#{CONTENT_PREFIX}_\#{name}")
end
EOC
end
def content_validate(tags)
counter = {}
ELEMENTS.each do |x|
counter[x] = 0
ELEMENTS.each do |name|
counter[name] = 0
end
tags.each do |tag|
@ -45,8 +45,9 @@ module RSS
prefix_size = CONTENT_PREFIX.size + 1
ContentModel::ELEMENTS.uniq!
ContentModel::ELEMENTS.each do |x|
BaseListener.install_get_text_element(CONTENT_URI, x[prefix_size..-1], "#{x}=")
ContentModel::ELEMENTS.each do |full_name|
name = full_name[prefix_size..-1]
BaseListener.install_get_text_element(CONTENT_URI, name, "#{full_name}=")
end
end