Sha256: 9b84e6fe68667382302658c84ad32c6b81b78b2f70ae92fd118b20dd367a6be8
Contents?: true
Size: 432 Bytes
Versions: 12
Compression:
Stored size: 432 Bytes
Contents
# A collection of elements offering a Hash-like access based on # their +id+. class MissionControl::Jobs::IdentifiedElements include Enumerable delegate :[], :empty?, to: :elements delegate :each, :last, :length, to: :to_a def initialize @elements = HashWithIndifferentAccess.new end def <<(item) @elements[item.id] = item end def to_a @elements.values end private attr_reader :elements end
Version data entries
12 entries across 12 versions & 1 rubygems