Class: UsesFromMacOSDependency
Overview
A dependency that’s marked as “installed” on macOS
Constant Summary
Constants included
from Dependable
Dependable::RESERVED_TAGS
Instance Attribute Summary collapse
Attributes inherited from Dependency
#env_proc, #name, #option_names, #tap
Attributes included from Dependable
#tags
Instance Method Summary
collapse
Methods inherited from Dependency
#_dump, _load, action, expand, keep_but_prune_recursive_deps, merge_repeats, #missing_options, #modify_build_environment, prune, #satisfied?, skip, #to_formula, #to_s
Methods included from Cachable
#cache, #clear_cache
Methods included from Dependable
#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?
Constructor Details
#initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name], bounds:) ⇒ UsesFromMacOSDependency
Returns a new instance of UsesFromMacOSDependency.
237
238
239
240
241
|
# File 'dependency.rb', line 237
def initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name], bounds:)
super(name, tags, env_proc, option_names)
@bounds = bounds
end
|
Instance Attribute Details
Returns the value of attribute bounds.
235
236
237
|
# File 'dependency.rb', line 235
def bounds
@bounds
end
|
Instance Method Details
#==(other) ⇒ Object
243
244
245
|
# File 'dependency.rb', line 243
def ==(other)
instance_of?(other.class) && name == other.name && tags == other.tags && bounds == other.bounds
end
|
278
279
280
|
# File 'dependency.rb', line 278
def dup_with_formula_name(formula)
self.class.new(formula.full_name.to_s, tags, env_proc, option_names, bounds: bounds)
end
|
247
248
249
|
# File 'dependency.rb', line 247
def hash
[name, tags, bounds].hash
end
|
283
284
285
|
# File 'dependency.rb', line 283
def inspect
"#<#{self.class.name}: #{name.inspect} #{tags.inspect} #{bounds.inspect}>"
end
|
#installed?(minimum_version: nil) ⇒ Boolean
251
252
253
|
# File 'dependency.rb', line 251
def installed?(minimum_version: nil)
use_macos_install? || super(minimum_version: minimum_version)
end
|
#use_macos_install? ⇒ Boolean
#uses_from_macos? ⇒ Boolean
273
274
275
|
# File 'dependency.rb', line 273
def uses_from_macos?
true
end
|