Class: Resource::Patch Private
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 resource containing a patch.
Instance Attribute Summary collapse
- #patch_files ⇒ Object readonly private
Attributes inherited from Resource
#checksum, #download_strategy, #name, #owner, #patches, #source_modified_time
Attributes included from Downloadable
Instance Method Summary collapse
- #apply(*paths) ⇒ Object private
- #directory(val = nil) ⇒ Object private
- #download_queue_name ⇒ String private
- #download_queue_type ⇒ String private
-
#initialize(&block) ⇒ Patch
constructor
private
A new instance of Patch.
Methods inherited from Resource
#apply_patches, #fetch, #fetch_patches, #files, #freeze, #initialize_dup, #livecheck, #livecheck_defined?, #livecheckable?, #mirror, #patch, #prepare_patches, #sha256, #specs, #stage, #unpack, #url, #using, #version
Methods included from OnSystem::MacOSAndLinux
included, #on_arch_conditional, #on_macos, #on_system_conditional
Methods included from Downloadable
#cached_download, #clear_cache, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize_dup, #verify_download_integrity, #version
Methods included from Context
current, current=, #debug?, #quiet?, #verbose?, #with_context
Constructor Details
#initialize(&block) ⇒ Patch
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 a new instance of Patch.
382 383 384 385 386 |
# File 'resource.rb', line 382 def initialize(&block) @patch_files = [] @directory = nil super "patch", &block end |
Instance Attribute Details
#patch_files ⇒ Object (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.
380 381 382 |
# File 'resource.rb', line 380 def patch_files @patch_files end |
Instance Method Details
#apply(*paths) ⇒ Object
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.
388 389 390 391 392 |
# File 'resource.rb', line 388 def apply(*paths) paths.flatten! @patch_files.concat(paths) @patch_files.uniq! end |
#directory(val = nil) ⇒ Object
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.
394 395 396 397 398 |
# File 'resource.rb', line 394 def directory(val = nil) return @directory if val.nil? @directory = val end |
#download_queue_name ⇒ 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.
404 405 406 407 408 409 410 |
# File 'resource.rb', line 404 def download_queue_name if (last_url_component = url.to_s.split("/").last) return last_url_component end super end |
#download_queue_type ⇒ 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.
401 |
# File 'resource.rb', line 401 def download_queue_type = "Patch" |