Class: Dependencies

Inherits:
Array
  • Object
show all
Defined in:
brew/Library/Homebrew/dependencies.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Dependencies

Returns a new instance of Dependencies



6
7
8
# File 'brew/Library/Homebrew/dependencies.rb', line 6

def initialize(*args)
  super(args)
end

Instance Method Details

#buildObject



20
21
22
# File 'brew/Library/Homebrew/dependencies.rb', line 20

def build
  select(&:build?)
end

#defaultObject



28
29
30
# File 'brew/Library/Homebrew/dependencies.rb', line 28

def default
  build + required + recommended
end

#inspectObject



32
33
34
# File 'brew/Library/Homebrew/dependencies.rb', line 32

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

#optionalObject



12
13
14
# File 'brew/Library/Homebrew/dependencies.rb', line 12

def optional
  select(&:optional?)
end


16
17
18
# File 'brew/Library/Homebrew/dependencies.rb', line 16

def recommended
  select(&:recommended?)
end

#requiredObject



24
25
26
# File 'brew/Library/Homebrew/dependencies.rb', line 24

def required
  select(&:required?)
end