diff options
| author | Markus Reiter | 2017-02-05 23:29:42 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-07 00:07:59 +0100 |
| commit | ac4969c3314641c8b5202ae67e2287f6b5bbb664 (patch) | |
| tree | ae2dcf1ed727219f1ffdd62965778ade33bd4587 /Library/Homebrew/cask/lib | |
| parent | 4a4a162223f015abd6bb78d0dc268157526686f8 (diff) | |
| download | brew-ac4969c3314641c8b5202ae67e2287f6b5bbb664.tar.bz2 | |
Convert `self.artifacts` to `TYPES`.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact.rb | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact.rb b/Library/Homebrew/cask/lib/hbc/artifact.rb index 49346d7cc..b155a125a 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact.rb @@ -27,39 +27,37 @@ module Hbc module Artifact # NOTE: order is important here, since we want to extract nested containers # before we handle any other artifacts - def self.artifacts - [ - PreflightBlock, - NestedContainer, - Installer, - App, - Suite, - Artifact, # generic 'artifact' stanza - Colorpicker, - Pkg, - Prefpane, - Qlplugin, - Dictionary, - Font, - Service, - StageOnly, - Binary, - InputMethod, - InternetPlugin, - AudioUnitPlugin, - VstPlugin, - Vst3Plugin, - ScreenSaver, - Uninstall, - PostflightBlock, - Zap, - ] - end + TYPES = [ + PreflightBlock, + NestedContainer, + Installer, + App, + Suite, + Artifact, # generic 'artifact' stanza + Colorpicker, + Pkg, + Prefpane, + Qlplugin, + Dictionary, + Font, + Service, + StageOnly, + Binary, + InputMethod, + InternetPlugin, + AudioUnitPlugin, + VstPlugin, + Vst3Plugin, + ScreenSaver, + Uninstall, + PostflightBlock, + Zap, + ].freeze def self.for_cask(cask, command: SystemCommand, force: false) odebug "Determining which artifacts are present in Cask #{cask}" - artifacts + TYPES .select { |klass| klass.me?(cask) } .map { |klass| klass.new(cask, command: command, force: force) } end |
