class Puppet::Graph::Key
Sequential, nestable keys for tracking order of insertion in “the graph” @api private
Attributes
value[R]
Public Class Methods
new(value = [0])
click to toggle source
# File lib/puppet/graph/key.rb 10 def initialize(value = [0]) 11 @value = value 12 end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/puppet/graph/key.rb 24 def <=>(other) 25 @value <=> other.value 26 end
down()
click to toggle source
# File lib/puppet/graph/key.rb 20 def down 21 Puppet::Graph::Key.new(@value + [0]) 22 end
next()
click to toggle source
# File lib/puppet/graph/key.rb 14 def next 15 next_values = @value.clone 16 next_values[-1] += 1 17 Puppet::Graph::Key.new(next_values) 18 end