Sha256: 4842f38dc9edb0f9f20f230265ebbc323d01ba2214f043dee3971b90e45792ec

Contents?: true

Size: 624 Bytes

Versions: 2

Compression:

Stored size: 624 Bytes

Contents

require 'compo/branch'

module Compo
  # A simple implementation of a branch, whose children are stored in an Hash
  #
  # An HashBranch is a composite object that may be moved into other composite
  # objects.  It stores its children as an Hash, and the ID of each child is
  # its hash key.  Inserting and removing items into the HashBranch will not
  # change the IDs of other items, but inserting with an existing key will
  # remove the previous occupant.
  #
  # This is an extension of HashComposite to include the Movable and
  # ParentTracker mixins.
  class HashBranch < HashComposite
    include Branch
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compo-0.3.1 lib/compo/hash_branch.rb
compo-0.3.0 lib/compo/hash_branch.rb