Improve style

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Rylan Polster 2023-01-02 12:58:40 -05:00
parent 68bbe03d04
commit 54e013aef6
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -18,7 +18,8 @@ module Homebrew
sig { returns(Hash) }
def all_casks
@all_casks ||= begin
json_casks = Homebrew::API.fetch_json_api_file "cask.json", target: HOMEBREW_CACHE_API/"cask.json"
json_casks = Homebrew::API.fetch_json_api_file "cask.json",
target: HOMEBREW_CACHE_API/"cask.json"
json_casks.to_h do |json_cask|
[json_cask["token"], json_cask.except("token")]