Sha256: 054ff328a84d5ccf8ff32ec7d5db83a9f31d73c81652e2faf2903c233e25bd2e

Contents?: true

Size: 461 Bytes

Versions: 761

Compression:

Stored size: 461 Bytes

Contents

# Sequential, nestable keys for tracking order of insertion in "the graph"
# @api private
class Puppet::Graph::Key
  include Comparable

  attr_reader :value
  protected :value

  def initialize(value = [0])
    @value = value
  end

  def next
    next_values = @value.clone
    next_values[-1] += 1
    Puppet::Graph::Key.new(next_values)
  end

  def down
    Puppet::Graph::Key.new(@value + [0])
  end

  def <=>(other)
    @value <=> other.value
  end
end

Version data entries

761 entries across 761 versions & 3 rubygems

Version Path
puppet-7.34.0 lib/puppet/graph/key.rb
puppet-7.34.0-x86-mingw32 lib/puppet/graph/key.rb
puppet-7.34.0-x64-mingw32 lib/puppet/graph/key.rb
puppet-7.34.0-universal-darwin lib/puppet/graph/key.rb
puppet-7.33.0 lib/puppet/graph/key.rb
puppet-7.33.0-x86-mingw32 lib/puppet/graph/key.rb
puppet-7.33.0-x64-mingw32 lib/puppet/graph/key.rb
puppet-7.33.0-universal-darwin lib/puppet/graph/key.rb
puppet-7.32.1 lib/puppet/graph/key.rb
puppet-7.32.1-x86-mingw32 lib/puppet/graph/key.rb
puppet-7.32.1-x64-mingw32 lib/puppet/graph/key.rb
puppet-7.32.1-universal-darwin lib/puppet/graph/key.rb
puppet-7.31.0 lib/puppet/graph/key.rb
puppet-7.31.0-x86-mingw32 lib/puppet/graph/key.rb
puppet-7.31.0-x64-mingw32 lib/puppet/graph/key.rb
puppet-7.31.0-universal-darwin lib/puppet/graph/key.rb
puppet-7.30.0 lib/puppet/graph/key.rb
puppet-7.30.0-x86-mingw32 lib/puppet/graph/key.rb
puppet-7.30.0-x64-mingw32 lib/puppet/graph/key.rb
puppet-7.30.0-universal-darwin lib/puppet/graph/key.rb