Module: Dependable Private
- Included in:
- Dependency, Requirement
- Defined in:
- Library/Homebrew/dependable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Shared functions for classes which can be depended upon.
Constant Summary collapse
- RESERVED_TAGS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:run
and:linked
are no longer used but keep them here to avoid their misuse in future. [:build, :optional, :recommended, :run, :test, :linked].freeze
Instance Method Summary collapse
- #build? ⇒ Boolean private
- #option_tags ⇒ Object private
- #optional? ⇒ Boolean private
- #options ⇒ Object 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 Method Details
#build? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'Library/Homebrew/dependable.rb', line 14 def build? .include? :build end |
#option_tags ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'Library/Homebrew/dependable.rb', line 34 def - RESERVED_TAGS end |
#optional? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'Library/Homebrew/dependable.rb', line 18 def optional? .include? :optional end |
#options ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'Library/Homebrew/dependable.rb', line 38 def Options.create() end |
#prune_from_option?(build) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 45 46 |
# File 'Library/Homebrew/dependable.rb', line 42 def prune_from_option?(build) return 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. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 51 52 53 |
# File 'Library/Homebrew/dependable.rb', line 48 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. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'Library/Homebrew/dependable.rb', line 22 def recommended? .include? :recommended end |
#required? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'Library/Homebrew/dependable.rb', line 30 def required? !build? && !test? && !optional? && !recommended? end |
#test? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'Library/Homebrew/dependable.rb', line 26 def test? .include? :test end |