Cask::DSL::DependsOn: add empty?, present? methods
`#present?` is called on a `DependsOn` object in `Cask::DSL` and this is seemingly deferred to the underlying hash object but Sorbet doesn't understand this kind of `SimpleDelegator` magic. This adds `empty?` and `present?` methods that explicitly interact with the hash in a way that Sorbet can understand.
This commit is contained in:
		
							parent
							
								
									3d2ab610c9
								
							
						
					
					
						commit
						c495aa3e63
					
				@ -82,6 +82,12 @@ module Cask
 | 
			
		||||
 | 
			
		||||
        @arch.concat(arches.map { |arch| VALID_ARCHES[arch] })
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      sig { returns(T::Boolean) }
 | 
			
		||||
      def empty? = T.let(__getobj__, T::Hash[Symbol, T.untyped]).empty?
 | 
			
		||||
 | 
			
		||||
      sig { returns(T::Boolean) }
 | 
			
		||||
      def present? = !empty?
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user