Class: Dependencies Private

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
dependencies.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

A collection of dependencies.

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Dependencies

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.

Returns a new instance of Dependencies.



10
11
12
# File 'dependencies.rb', line 10

def initialize(*args)
  super(args)
end

Instance Method Details

#buildObject

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.



24
25
26
# File 'dependencies.rb', line 24

def build
  __getobj__.select(&:build?)
end

#defaultObject

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 'dependencies.rb', line 32

def default
  build + required + recommended
end

#dup_without_system_depsObject

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.



36
37
38
# File 'dependencies.rb', line 36

def dup_without_system_deps
  self.class.new(*__getobj__.reject { |dep| dep.uses_from_macos? && dep.use_macos_install? })
end

#inspectString

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.

Returns:



41
42
43
# File 'dependencies.rb', line 41

def inspect
  "#<#{self.class.name}: #{__getobj__}>"
end

#optionalObject

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.



16
17
18
# File 'dependencies.rb', line 16

def optional
  __getobj__.select(&:optional?)
end

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.



20
21
22
# File 'dependencies.rb', line 20

def recommended
  __getobj__.select(&:recommended?)
end

#requiredObject

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.



28
29
30
# File 'dependencies.rb', line 28

def required
  __getobj__.select(&:required?)
end