brew/Library/Homebrew/cask/artifact_set.rb
2024-04-26 19:04:20 +02:00

21 lines
324 B
Ruby

# typed: true
# frozen_string_literal: true
require "set"
module Cask
# Sorted set containing all cask artifacts.
class ArtifactSet < ::Set
def each(&block)
return enum_for(T.must(__method__)) { size } unless block
to_a.each(&block)
self
end
def to_a
super.sort
end
end
end