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:
		
							parent
							
								
									56ce2994de
								
							
						
					
					
						commit
						5f3a36794a
					
				
					 12 changed files with 147 additions and 141 deletions
				
			
		|  | @ -11,17 +11,17 @@ module RSS | |||
| 
 | ||||
|   TAXO_ELEMENTS = [] | ||||
| 
 | ||||
|   %w(link).each do |x| | ||||
|     if const_defined? :Listener | ||||
|       Listener.install_get_text_element(TAXO_NS, x, "#{TAXO_PREFIX}_#{x}=") | ||||
|     end | ||||
|     TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{x}" | ||||
|   %w(link).each do |name| | ||||
|     full_name = "#{TAXO_PREFIX}_#{name}" | ||||
|     BaseListener.install_get_text_element(TAXO_NS, name, "#{full_name}=") | ||||
|     TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}" | ||||
|   end | ||||
|      | ||||
|   module TaxonomyModel | ||||
|     attr_writer(*%w(title description creator subject publisher | ||||
|                     contributor date format identifier source | ||||
|                     language relation coverage rights).collect{|x| "#{TAXO_PREFIX}_#{x}"}) | ||||
|                     language relation coverage rights | ||||
|                    ).collect{|name| "#{TAXO_PREFIX}_#{name}"}) | ||||
|   end | ||||
|    | ||||
|   class Channel; extend TaxonomyModel;	end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kou
						kou