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
- PRUNE =
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.
Return from an Dependency.expand or Requirement.expand block to remove a dependency/requirement and all of its recursive dependencies from the result list.
:prune- SKIP =
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.
Return from a Dependency.expand block to omit a dependency from the result list but continue expanding its children.
:skip- KEEP_BUT_PRUNE_RECURSIVE_DEPS =
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.
Return from a Dependency.expand block to keep a dependency in the result list but stop recursing into its own dependencies.
:keep_but_prune_recursive_deps- 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. T.let( [:build, :optional, :recommended, :run, :test, :linked, :implicit, :no_linkage].freeze, T::Array[Symbol], )
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
- #tags ⇒ Array<Symbol, String, Array<T.untyped>> private
- #test? ⇒ Boolean private
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.
40 41 42 |
# File 'dependable.rb', line 40 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.
60 61 62 |
# File 'dependable.rb', line 60 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.
65 66 67 |
# File 'dependable.rb', line 65 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.
37 |
# File 'dependable.rb', line 37 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.
75 76 77 |
# File 'dependable.rb', line 75 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.
45 46 47 |
# File 'dependable.rb', line 45 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.
80 81 82 |
# File 'dependable.rb', line 80 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.
85 86 87 88 89 |
# File 'dependable.rb', line 85 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.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'dependable.rb', line 92 def prune_if_build_and_not_dependent?(dependent, formula = nil) return false unless build? if formula dependent != formula else raise "dependent is not a formula or cask dependent" unless dependent.is_a?(Dependency) dependent.installed? end 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.
50 51 52 |
# File 'dependable.rb', line 50 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.
70 71 72 |
# File 'dependable.rb', line 70 def required? !build? && !test? && !optional? && !recommended? end |
#tags ⇒ Array<Symbol, String, Array<T.untyped>>
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.
32 33 34 |
# File 'dependable.rb', line 32 def @tags ||= T.let([], T.nilable(T::Array[T.any(Symbol, String, T::Array[T.untyped])])) 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.
55 56 57 |
# File 'dependable.rb', line 55 def test? .include? :test end |