Class: Homebrew::FormulaStub Private

Inherits:
T::Struct
  • Object
show all
Defined in:
formula_stub.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 stub for a formula, with only the information needed to fetch the bottle manifest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, pkg_version:, rebuild: 0, sha256: nil) ⇒ void

Parameters:

  • name (String)
  • pkg_version (PkgVersion)
  • rebuild (Integer) (defaults to: 0)
  • sha256 (String, nil) (defaults to: nil)


# File ''

const :name, String
const :pkg_version, PkgVersion
const :rebuild, Integer, default: 0
const :sha256, T.nilable(String)

Instance Attribute Details

#nameString (readonly)

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 the value of prop name.

Returns:



# File ''

const :name, String

#pkg_versionPkgVersion (readonly)

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 the value of prop pkg_version.

Returns:



# File ''

const :pkg_version, PkgVersion

#rebuildInteger (readonly)

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 the value of prop rebuild.

Returns:

  • (Integer)


# File ''

const :rebuild, Integer, default: 0

#sha256String? (readonly)

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 the value of prop sha256.

Returns:



# File ''

const :sha256, T.nilable(String)

Instance Method Details

#revisionInteger

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:

  • (Integer)


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

def revision
  pkg_version.revision
end

#versionVersion

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:



15
16
17
# File 'formula_stub.rb', line 15

def version
  pkg_version.version
end