brew/Library/Homebrew/cask/artifact_set.rb

19 lines
309 B
Ruby
Raw Normal View History

2023-02-22 09:11:29 -08:00
# typed: true
# frozen_string_literal: true
module Cask
# Sorted set containing all cask artifacts.
class ArtifactSet < ::Set
def each(&block)
2023-02-22 09:11:29 -08:00
return enum_for(T.must(__method__)) { size } unless block
to_a.each(&block)
self
end
def to_a
super.sort
end
end
end