| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-06 08:29:14 +02:00
										 |  |  | module Cask | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |   class DSL | 
					
						
							|  |  |  |     class Appcast | 
					
						
							| 
									
										
										
										
											2019-05-21 15:10:39 +02:00
										 |  |  |       attr_reader :uri, :parameters, :configuration | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-04 15:47:53 +02:00
										 |  |  |       def initialize(uri, **parameters) | 
					
						
							|  |  |  |         @uri        = URI(uri) | 
					
						
							|  |  |  |         @parameters = parameters | 
					
						
							| 
									
										
										
										
											2019-05-21 15:10:39 +02:00
										 |  |  |         @configuration = parameters[:configuration] if parameters.key?(:configuration) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def to_yaml | 
					
						
							| 
									
										
										
										
											2017-10-04 15:47:53 +02:00
										 |  |  |         [uri, parameters].to_yaml | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def to_s | 
					
						
							| 
									
										
										
										
											2017-10-04 15:47:53 +02:00
										 |  |  |         uri.to_s | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |   end | 
					
						
							|  |  |  | end |