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 9 def initialize(value = [0]) 10 @value = value 11 end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/puppet/graph/key.rb 23 def <=>(other) 24 @value <=> other.value 25 end
down()
click to toggle source
# File lib/puppet/graph/key.rb 19 def down 20 Puppet::Graph::Key.new(@value + [0]) 21 end
next()
click to toggle source
# File lib/puppet/graph/key.rb 13 def next 14 next_values = @value.clone 15 next_values[-1] += 1 16 Puppet::Graph::Key.new(next_values) 17 end