Class: TapDependency

Inherits:
Dependency show all
Defined in:
dependency.rb

Overview

A dependency on another Homebrew formula in a specific tap.

Constant Summary

Constants included from Dependable

Dependable::RESERVED_TAGS

Instance Attribute Summary collapse

Attributes inherited from Dependency

#env_proc, #name, #option_names, #tags

Instance Method Summary collapse

Methods inherited from Dependency

#==, #_dump, _load, action, expand, #hash, #inspect, 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?, #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.split("/").last]) ⇒ TapDependency

Returns a new instance of TapDependency.



203
204
205
206
# File 'dependency.rb', line 203

def initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name.split("/").last])
  @tap = Tap.fetch(name.rpartition("/").first)
  super(name, tags, env_proc, option_names)
end

Instance Attribute Details

#tapObject (readonly)

Returns the value of attribute tap.



201
202
203
# File 'dependency.rb', line 201

def tap
  @tap
end

Instance Method Details

#installed?Boolean

Returns:

  • (Boolean)


208
209
210
211
212
# File 'dependency.rb', line 208

def installed?
  super
rescue FormulaUnavailableError
  false
end