Class: Bottle
- Inherits:
-
Object
- Object
- Bottle
- Extended by:
- Forwardable
- Defined in:
- Library/Homebrew/software_spec.rb
Defined Under Namespace
Classes: Filename
Instance Attribute Summary collapse
-
#cellar ⇒ Object
readonly
Returns the value of attribute cellar.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#rebuild ⇒ Object
readonly
Returns the value of attribute rebuild.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #compatible_cellar? ⇒ Boolean
-
#initialize(formula, spec) ⇒ Bottle
constructor
A new instance of Bottle.
-
#skip_relocation? ⇒ Boolean
Does the bottle need to be relocated?.
- #stage ⇒ Object
Constructor Details
#initialize(formula, spec) ⇒ Bottle
Returns a new instance of Bottle.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'Library/Homebrew/software_spec.rb', line 289 def initialize(formula, spec) @name = formula.name @resource = Resource.new @resource.owner = formula @resource.specs[:bottle] = true @spec = spec checksum, tag = spec.checksum_for(Utils::Bottles.tag) filename = Filename.create(formula, tag, spec.rebuild) @resource.url("#{spec.root_url}/#{filename.bintray}", select_download_strategy(spec.root_url_specs)) @resource.version = formula.pkg_version @resource.checksum = checksum @prefix = spec.prefix @cellar = spec.cellar @rebuild = spec.rebuild end |
Instance Attribute Details
#cellar ⇒ Object (readonly)
Returns the value of attribute cellar
284 285 286 |
# File 'Library/Homebrew/software_spec.rb', line 284 def cellar @cellar end |
#name ⇒ Object (readonly)
Returns the value of attribute name
284 285 286 |
# File 'Library/Homebrew/software_spec.rb', line 284 def name @name end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix
284 285 286 |
# File 'Library/Homebrew/software_spec.rb', line 284 def prefix @prefix end |
#rebuild ⇒ Object (readonly)
Returns the value of attribute rebuild
284 285 286 |
# File 'Library/Homebrew/software_spec.rb', line 284 def rebuild @rebuild end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource
284 285 286 |
# File 'Library/Homebrew/software_spec.rb', line 284 def resource @resource end |
Instance Method Details
#compatible_cellar? ⇒ Boolean
308 309 310 |
# File 'Library/Homebrew/software_spec.rb', line 308 def compatible_cellar? @spec.compatible_cellar? end |
#skip_relocation? ⇒ Boolean
Does the bottle need to be relocated?
313 314 315 |
# File 'Library/Homebrew/software_spec.rb', line 313 def skip_relocation? @spec.skip_relocation? end |
#stage ⇒ Object
317 318 319 |
# File 'Library/Homebrew/software_spec.rb', line 317 def stage resource.downloader.stage end |