Anons79 Mini Shell

Directory : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/key.rb

# 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

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]