Class: Puppet::Graph::Key Private
- Includes:
- Comparable
- Defined in:
- lib/puppet/graph/key.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Sequential, nestable keys for tracking order of insertion in “the graph”
Instance Method Summary collapse
- #<=>(other) ⇒ Object private
- #down ⇒ Object private
-
#initialize(value = [0]) ⇒ Key
constructor
private
A new instance of Key.
- #next ⇒ Object private
Constructor Details
#initialize(value = [0]) ⇒ Key
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Key.
9 10 11 |
# File 'lib/puppet/graph/key.rb', line 9 def initialize(value = [0]) @value = value end |
Instance Method Details
#<=>(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/puppet/graph/key.rb', line 23 def <=>(other) @value <=> other.value end |
#down ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/puppet/graph/key.rb', line 19 def down Puppet::Graph::Key.new(@value + [0]) end |
#next ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 |
# 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 |