Module: Dependable Abstract Private
Overview
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Subclasses must implement the abstract methods below.
Shared functions for classes which can be depended upon.
Constant Summary collapse
- RESERVED_TAGS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
:runand:linkedare no longer used but keep them here to avoid their misuse in future. [:build, :optional, :recommended, :run, :test, :linked, :implicit, :no_linkage].freeze
Instance Attribute Summary collapse
- #tags ⇒ Object readonly private
Instance Method Summary collapse
- #build? ⇒ Boolean private
- #implicit? ⇒ Boolean private
- #no_linkage? ⇒ Boolean private
- #option_names ⇒ Array<String> abstract private
- #option_tags ⇒ Array<String> private
- #optional? ⇒ Boolean private
- #options ⇒ Options private
- #prune_from_option?(build) ⇒ Boolean private
- #prune_if_build_and_not_dependent?(dependent, formula = nil) ⇒ Boolean private
- #recommended? ⇒ Boolean private
- #required? ⇒ Boolean private
- #test? ⇒ Boolean private
Instance Attribute Details
#tags ⇒ Object (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
14 15 16 |
# File 'dependable.rb', line 14 def @tags end |
Instance Method Details
#build? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
21 22 23 |
# File 'dependable.rb', line 21 def build? .include? :build end |
#implicit? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
37 38 39 |
# File 'dependable.rb', line 37 def implicit? .include? :implicit end |
#no_linkage? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
41 42 43 |
# File 'dependable.rb', line 41 def no_linkage? .include? :no_linkage end |
#option_names ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
19 |
# File 'dependable.rb', line 19 def option_names; end |
#option_tags ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
50 51 52 |
# File 'dependable.rb', line 50 def .grep(String) end |
#optional? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
25 26 27 |
# File 'dependable.rb', line 25 def optional? .include? :optional end |
#options ⇒ Options
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
55 56 57 |
# File 'dependable.rb', line 55 def Options.create() end |
#prune_from_option?(build) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
59 60 61 62 63 |
# File 'dependable.rb', line 59 def prune_from_option?(build) return false if !optional? && !recommended? build.without?(self) end |
#prune_if_build_and_not_dependent?(dependent, formula = nil) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
65 66 67 68 69 70 |
# File 'dependable.rb', line 65 def prune_if_build_and_not_dependent?(dependent, formula = nil) return false unless build? return dependent.installed? unless formula dependent != formula end |
#recommended? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 |
# File 'dependable.rb', line 29 def recommended? .include? :recommended end |
#required? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
45 46 47 |
# File 'dependable.rb', line 45 def required? !build? && !test? && !optional? && !recommended? end |
#test? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
33 34 35 |
# File 'dependable.rb', line 33 def test? .include? :test end |