mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	prevent adding property to collection/model multiple times
This commit is contained in:
		
							parent
							
								
									3611de077d
								
							
						
					
					
						commit
						50a126335f
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -5,7 +5,8 @@ module Fog
 | 
			
		|||
      class_eval <<-EOS, __FILE__, __LINE__
 | 
			
		||||
        attr_accessor :#{name}
 | 
			
		||||
      EOS
 | 
			
		||||
      attributes << name
 | 
			
		||||
      @attributes ||= []
 | 
			
		||||
      @attributes |= [name]
 | 
			
		||||
      for other_name in [*other_names]
 | 
			
		||||
        aliases[other_name] = name
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,8 @@ module Fog
 | 
			
		|||
      class_eval <<-EOS, __FILE__, __LINE__
 | 
			
		||||
        attr_accessor :#{name}
 | 
			
		||||
      EOS
 | 
			
		||||
      attributes << name
 | 
			
		||||
      @attributes ||= []
 | 
			
		||||
      @attributes |= [name]
 | 
			
		||||
      for other_name in [*other_names]
 | 
			
		||||
        aliases[other_name] = name
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue