Mike McQuaid 1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00

22 lines
508 B
Ruby

# typed: true
# frozen_string_literal: true
module Cask
class Cask
extend Enumerable
def self.each(&block)
odisabled "`Enumerable` methods on `Cask::Cask`",
"`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)"
return to_enum unless block
Tap.flat_map(&:cask_files).each do |f|
yield CaskLoader::FromTapPathLoader.new(f).load(config: nil)
rescue CaskUnreadableError => e
opoo e.message
end
end
end
end