Class: Homebrew::API::CaskStruct Private
- Defined in:
- api/cask_struct.rb,
sorbet/rbi/dsl/homebrew/api/cask_struct.rbi
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.
Constant Summary collapse
- PREDICATES =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
[ :auto_updates, :caveats, :conflicts, :container, :depends_on, :deprecate, :desc, :disable, :homepage, ].freeze
- ArtifactArgs =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.type_alias do [ Symbol, T::Array[T.anything], T::Hash[Symbol, T.anything], T.nilable(T.proc.void), ] end
- DependsOnArgs =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.type_alias do T::Hash[ # Keys are dependency types like :macos, :arch, :cask, :formula Symbol, # Values can be any of: T.any( # Strings like ">= :catalina" for :macos String, # Symbols like :intel or :arm64 for :arch Symbol, # Array of strings or symbols for :cask and :formula T::Array[T.any(String, Symbol)], ), ] end
Instance Attribute Summary collapse
-
#auto_updates ⇒ Boolean
readonly
private
Changes to this struct must be mirrored in Homebrew::API::Cask.generate_cask_struct_hash.
-
#conflicts_with_args ⇒ Hash{Symbol => Array<String>}
readonly
private
Returns the value of prop
conflicts_with_args. -
#container_args ⇒ Hash{Symbol => Symbol, T.anything}
readonly
private
Returns the value of prop
container_args. -
#depends_on_args ⇒ DependsOnArgs
readonly
private
Returns the value of prop
depends_on_args. -
#deprecate_args ⇒ Hash{Symbol => String, Symbol, nil}
readonly
private
Returns the value of prop
deprecate_args. -
#desc ⇒ String?
readonly
private
Returns the value of prop
desc. -
#disable_args ⇒ Hash{Symbol => String, Symbol, nil}
readonly
private
Returns the value of prop
disable_args. -
#homepage ⇒ String?
readonly
private
Returns the value of prop
homepage. -
#languages ⇒ Array<String>
readonly
private
Returns the value of prop
languages. -
#names ⇒ Array<String>
readonly
private
Returns the value of prop
names. -
#raw_artifacts ⇒ Array<ArtifactArgs>
readonly
private
Returns the value of prop
raw_artifacts. -
#raw_caveats ⇒ String?
readonly
private
Returns the value of prop
raw_caveats. -
#renames ⇒ Array<Array<(String, String)>>
readonly
private
Returns the value of prop
renames. -
#ruby_source_checksum ⇒ Hash{Symbol => String}
readonly
private
Returns the value of prop
ruby_source_checksum. -
#ruby_source_path ⇒ String?
readonly
private
Returns the value of prop
ruby_source_path. -
#sha256 ⇒ String, Symbol
readonly
private
Returns the value of prop
sha256. -
#tap_git_head ⇒ String?
readonly
private
Returns the value of prop
tap_git_head. -
#tap_string ⇒ String?
readonly
private
Returns the value of prop
tap_string. -
#url_args ⇒ Array<String>
readonly
private
Returns the value of prop
url_args. -
#url_kwargs ⇒ Hash{Symbol => T.anything}
readonly
private
Returns the value of prop
url_kwargs. -
#version ⇒ String, Symbol
readonly
private
Returns the value of prop
version.
Class Method Summary collapse
Instance Method Summary collapse
- #artifacts(appdir:) ⇒ Array<ArtifactArgs> private
- #auto_updates? ⇒ Boolean private
- #caveats(appdir:) ⇒ String? private
- #caveats? ⇒ Boolean private
- #conflicts? ⇒ Boolean private
- #container? ⇒ Boolean private
- #depends_on? ⇒ Boolean private
- #deprecate? ⇒ Boolean private
- #desc? ⇒ Boolean private
- #disable? ⇒ Boolean private
- #homepage? ⇒ Boolean private
- #initialize(auto_updates: false, conflicts_with_args: {}, container_args: {}, depends_on_args: {}, deprecate_args: {}, desc: nil, disable_args: {}, homepage: nil, languages: [], names: [], renames: [], ruby_source_checksum:, ruby_source_path: nil, sha256:, tap_git_head: nil, tap_string: nil, url_args: [], url_kwargs: {}, version:, raw_artifacts: [], raw_caveats: nil) ⇒ void constructor
Constructor Details
#initialize(auto_updates: false, conflicts_with_args: {}, container_args: {}, depends_on_args: {}, deprecate_args: {}, desc: nil, disable_args: {}, homepage: nil, languages: [], names: [], renames: [], ruby_source_checksum:, ruby_source_path: nil, sha256:, tap_git_head: nil, tap_string: nil, url_args: [], url_kwargs: {}, version:, raw_artifacts: [], raw_caveats: nil) ⇒ void
|
|
# File '' const :auto_updates, T::Boolean, default: false const :conflicts_with_args, T::Hash[Symbol, T::Array[String]], default: {} const :container_args, T::Hash[Symbol, T.any(Symbol, T.anything)], default: {} const :depends_on_args, DependsOnArgs, default: {} const :deprecate_args, T::Hash[Symbol, T.nilable(T.any(String, Symbol))], default: {} const :desc, T.nilable(String) const :disable_args, T::Hash[Symbol, T.nilable(T.any(String, Symbol))], default: {} const :homepage, T.nilable(String) const :languages, T::Array[String], default: [] const :names, T::Array[String], default: [] const :renames, T::Array[[String, String]], default: [] const :ruby_source_path, T.nilable(String) const :sha256, T.any(String, Symbol) const :tap_git_head, T.nilable(String) const :tap_string, T.nilable(String) const :url_args, T::Array[String], default: [] const :url_kwargs, T::Hash[Symbol, T.anything], default: {} const :version, T.any(String, Symbol) const :raw_artifacts, T::Array[ArtifactArgs], default: [] const :raw_caveats, T.nilable(String) |
Instance Attribute Details
#auto_updates ⇒ Boolean (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.
Changes to this struct must be mirrored in Homebrew::API::Cask.generate_cask_struct_hash
|
|
# File '' const :auto_updates, T::Boolean, default: false |
#conflicts_with_args ⇒ Hash{Symbol => Array<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 conflicts_with_args.
|
|
# File '' const :conflicts_with_args, T::Hash[Symbol, T::Array[String]], default: {} |
#container_args ⇒ Hash{Symbol => Symbol, T.anything} (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 container_args.
|
|
# File '' const :container_args, T::Hash[Symbol, T.any(Symbol, T.anything)], default: {} |
#depends_on_args ⇒ DependsOnArgs (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 depends_on_args.
|
|
# File '' const :depends_on_args, DependsOnArgs, default: {} |
#deprecate_args ⇒ Hash{Symbol => String, Symbol, nil} (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 deprecate_args.
|
|
# File '' const :deprecate_args, T::Hash[Symbol, T.nilable(T.any(String, Symbol))], default: {} |
#desc ⇒ 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 desc.
|
|
# File '' const :desc, T.nilable(String) |
#disable_args ⇒ Hash{Symbol => String, Symbol, nil} (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 disable_args.
|
|
# File '' const :disable_args, T::Hash[Symbol, T.nilable(T.any(String, Symbol))], default: {} |
#homepage ⇒ 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 homepage.
|
|
# File '' const :homepage, T.nilable(String) |
#languages ⇒ Array<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 languages.
|
|
# File '' const :languages, T::Array[String], default: [] |
#names ⇒ Array<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 names.
|
|
# File '' const :names, T::Array[String], default: [] |
#raw_artifacts ⇒ Array<ArtifactArgs> (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 raw_artifacts.
|
|
# File '' const :raw_artifacts, T::Array[ArtifactArgs], default: [] |
#raw_caveats ⇒ 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 raw_caveats.
|
|
# File '' const :raw_caveats, T.nilable(String) |
#renames ⇒ Array<Array<(String, 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 renames.
|
|
# File '' const :renames, T::Array[[String, String]], default: [] |
#ruby_source_checksum ⇒ Hash{Symbol => 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 ruby_source_checksum.
|
|
# File ''
|
#ruby_source_path ⇒ 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 ruby_source_path.
|
|
# File '' const :ruby_source_path, T.nilable(String) |
#sha256 ⇒ String, Symbol (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.
|
|
# File '' const :sha256, T.any(String, Symbol) |
#tap_git_head ⇒ 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 tap_git_head.
|
|
# File '' const :tap_git_head, T.nilable(String) |
#tap_string ⇒ 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 tap_string.
|
|
# File '' const :tap_string, T.nilable(String) |
#url_args ⇒ Array<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 url_args.
|
|
# File '' const :url_args, T::Array[String], default: [] |
#url_kwargs ⇒ Hash{Symbol => T.anything} (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 url_kwargs.
|
|
# File '' const :url_kwargs, T::Hash[Symbol, T.anything], default: {} |
#version ⇒ String, Symbol (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.
|
|
# File '' const :version, T.any(String, Symbol) |
Class Method Details
.from_hash(cask_hash, ignore_types: false) ⇒ CaskStruct
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.
8 9 10 11 12 13 14 15 |
# File 'api/cask_struct.rb', line 8 def self.from_hash(cask_hash, ignore_types: false) return super(cask_hash) if ignore_types cask_hash = cask_hash.transform_keys(&:to_sym) .slice(*decorator.all_props) .compact_blank new(**cask_hash) end |
Instance Method Details
#artifacts(appdir:) ⇒ Array<ArtifactArgs>
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.
87 88 89 |
# File 'api/cask_struct.rb', line 87 def artifacts(appdir:) deep_remove_placeholders(raw_artifacts, appdir.to_s) end |
#auto_updates? ⇒ Boolean
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.
10 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 10 def auto_updates?; end |
#caveats(appdir:) ⇒ String?
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.
92 93 94 |
# File 'api/cask_struct.rb', line 92 def caveats(appdir:) deep_remove_placeholders(raw_caveats, appdir.to_s) end |
#caveats? ⇒ Boolean
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.
13 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 13 def caveats?; end |
#conflicts? ⇒ Boolean
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.
16 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 16 def conflicts?; end |
#container? ⇒ Boolean
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.
19 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 19 def container?; end |
#depends_on? ⇒ Boolean
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.
22 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 22 def depends_on?; end |
#deprecate? ⇒ Boolean
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.
25 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 25 def deprecate?; end |
#desc? ⇒ Boolean
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.
28 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 28 def desc?; end |
#disable? ⇒ Boolean
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.
31 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 31 def disable?; end |
#homepage? ⇒ Boolean
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.
34 |
# File 'sorbet/rbi/dsl/homebrew/api/cask_struct.rbi', line 34 def homepage?; end |