 0ed673abdb
			
		
	
	
		0ed673abdb
		
			
		
	
	
	
	
		
			
			This means linkage checks will be invoked during `brew install` and `brew audit` Closes #470. Signed-off-by: Xu Cheng <xucheng@me.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			626 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			626 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "options"
 | |
| 
 | |
| module Dependable
 | |
|   RESERVED_TAGS = [:build, :optional, :recommended, :run, :linked]
 | |
| 
 | |
|   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?
 | |
|     # FIXME: Should `required?` really imply `!build?`? And if so, why doesn't
 | |
|     #        any of `optional?` and `recommended?` equally imply `!build?`?
 | |
|     !build? && !optional? && !recommended?
 | |
|   end
 | |
| 
 | |
|   def option_tags
 | |
|     tags - RESERVED_TAGS
 | |
|   end
 | |
| 
 | |
|   def options
 | |
|     Options.create(option_tags)
 | |
|   end
 | |
| end
 |