 45a7730f61
			
		
	
	
		45a7730f61
		
	
	
	
	
		
			
			Fix those that can be done so without tearing Homebrew to pieces and remove the comments for those that can never be done.
		
			
				
	
	
		
			34 lines
		
	
	
		
			478 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			478 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "options"
 | |
| 
 | |
| module Dependable
 | |
|   RESERVED_TAGS = [:build, :optional, :recommended, :run, :linked].freeze
 | |
| 
 | |
|   def build?
 | |
|     tags.include? :build
 | |
|   end
 | |
| 
 | |
|   def optional?
 | |
|     tags.include? :optional
 | |
|   end
 | |
| 
 | |
|   def recommended?
 | |
|     tags.include? :recommended
 | |
|   end
 | |
| 
 | |
|   def run?
 | |
|     tags.include? :run
 | |
|   end
 | |
| 
 | |
|   def required?
 | |
|     !build? && !optional? && !recommended?
 | |
|   end
 | |
| 
 | |
|   def option_tags
 | |
|     tags - RESERVED_TAGS
 | |
|   end
 | |
| 
 | |
|   def options
 | |
|     Options.create(option_tags)
 | |
|   end
 | |
| end
 |