class Puppet::Graph::Key

Sequential, nestable keys for tracking order of insertion in “the graph” @api private

Attributes

value[R]

Public Instance Methods

<=>(other) click to toggle source
# File lib/puppet/graph/key.rb, line 23
def <=>(other)
  @value <=> other.value
end
down() click to toggle source
# File lib/puppet/graph/key.rb, line 19
def down
  Puppet::Graph::Key.new(@value + [0])
end
next() click to toggle source
# File lib/puppet/graph/key.rb, line 13
def next
  next_values = @value.clone
  next_values[-1] += 1
  Puppet::Graph::Key.new(next_values)
end

Public Class Methods

new(value = [0]) click to toggle source
# File lib/puppet/graph/key.rb, line 9
def initialize(value = [0])
  @value = value
end