mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
23 lines
338 B
Ruby
23 lines
338 B
Ruby
![]() |
# typed: false
|
||
|
# frozen_string_literal: true
|
||
|
|
||
|
require "set"
|
||
|
|
||
|
module Cask
|
||
|
# Sorted set containing all cask artifacts.
|
||
|
#
|
||
|
# @api private
|
||
|
class ArtifactSet < ::Set
|
||
|
def each(&block)
|
||
|
return enum_for(__method__) { size } unless block
|
||
|
|
||
|
to_a.each(&block)
|
||
|
self
|
||
|
end
|
||
|
|
||
|
def to_a
|
||
|
super.sort
|
||
|
end
|
||
|
end
|
||
|
end
|