brew/Library/Homebrew/dependable.rb

30 lines
421 B
Ruby
Raw Normal View History

require 'options'
module Dependable
2013-11-04 12:00:06 -06:00
RESERVED_TAGS = [:build, :optional, :recommended, :run]
def build?
tags.include? :build
end
def optional?
tags.include? :optional
end
def recommended?
tags.include? :recommended
end
2013-11-04 12:00:06 -06:00
def run?
tags.include? :run
end
2013-05-10 23:45:06 -05:00
def required?
!build? && !optional? && !recommended?
end
def options
Options.create(tags - RESERVED_TAGS)
end
end