Sha256: 9d274b3981a6744ac3b3f4e5fe56fd5c0bd0fdd0ef0d616511b83ea87106b980

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

require 'compo/branches/branch'
require 'compo/composites'

module Compo
  module Branches
    # A simple implementation of a branch, whose children are stored in an Hash
    #
    # A hash branch 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 branch will not
    # change the IDs of other items, but inserting with an existing key will
    # remove the previous occupant.
    class Hash < Compo::Composites::Hash
      include Branch
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
compo-0.5.1 lib/compo/branches/hash.rb
compo-0.5.0 lib/compo/branches/hash.rb
compo-0.4.0 lib/compo/branches/hash.rb