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:, version_scheme: 0, rebuild: 0, sha256: nil, aliases: [], oldnames: []) ⇒ void

Parameters:

  • name (String)
  • pkg_version (PkgVersion)
  • version_scheme (Integer) (defaults to: 0)
  • rebuild (Integer) (defaults to: 0)
  • sha256 (String, nil) (defaults to: nil)
  • aliases (Array<String>) (defaults to: [])
  • oldnames (Array<String>) (defaults to: [])


# File ''

const :name, String
const :pkg_version, PkgVersion
const :version_scheme, Integer, default: 0
const :rebuild, Integer, default: 0
const :sha256, T.nilable(String)
const :aliases, T::Array[String], default: []
const :oldnames, T::Array[String], default: []

Instance Attribute Details

#aliasesArray<String> (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 aliases.

Returns:



# File ''

const :aliases, T::Array[String], default: []

#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

#oldnamesArray<String> (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 oldnames.

Returns:



# File ''

const :oldnames, T::Array[String], default: []

#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)

#version_schemeInteger (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 version_scheme.

Returns:

  • (Integer)


# File ''

const :version_scheme, Integer, default: 0

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)


23
24
25
# File 'formula_stub.rb', line 23

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:



18
19
20
# File 'formula_stub.rb', line 18

def version
  pkg_version.version
end