| 
									
										
										
										
											2023-02-22 09:11:29 -08:00
										 |  |  | # typed: true | 
					
						
							| 
									
										
										
										
											2022-10-08 01:08:15 +01:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module Cask | 
					
						
							|  |  |  |   # Sorted set containing all cask artifacts. | 
					
						
							|  |  |  |   class ArtifactSet < ::Set | 
					
						
							|  |  |  |     def each(&block) | 
					
						
							| 
									
										
										
										
											2023-02-22 09:11:29 -08:00
										 |  |  |       return enum_for(T.must(__method__)) { size } unless block | 
					
						
							| 
									
										
										
										
											2022-10-08 01:08:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |       to_a.each(&block) | 
					
						
							|  |  |  |       self | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def to_a | 
					
						
							|  |  |  |       super.sort | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |