| 
									
										
										
										
											2016-11-03 16:28:16 -07:00
										 |  |  | class Version | 
					
						
							|  |  |  |   NULL = Class.new do | 
					
						
							|  |  |  |     include Comparable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def <=>(_other) | 
					
						
							|  |  |  |       -1
 | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def eql?(_other) | 
					
						
							|  |  |  |       # Makes sure that the same instance of Version::NULL | 
					
						
							|  |  |  |       # will never equal itself; normally Comparable#== | 
					
						
							|  |  |  |       # will return true for this regardless of the return | 
					
						
							|  |  |  |       # value of #<=> | 
					
						
							|  |  |  |       false | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def detected_from_url? | 
					
						
							|  |  |  |       false | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def head? | 
					
						
							|  |  |  |       false | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def null? | 
					
						
							|  |  |  |       true | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def to_f | 
					
						
							|  |  |  |       Float::NAN | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def to_s | 
					
						
							|  |  |  |       "" | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |     alias_method :to_str, :to_s | 
					
						
							| 
									
										
										
										
											2016-11-21 08:48:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def inspect | 
					
						
							|  |  |  |       "#<Version::NULL>".freeze | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-11-03 16:28:16 -07:00
										 |  |  |   end.new | 
					
						
							|  |  |  | end |