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.
11 12 13 |
# File 'lib/puppet/graph/key.rb', line 11 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.
25 26 27 |
# File 'lib/puppet/graph/key.rb', line 25 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.
21 22 23 |
# File 'lib/puppet/graph/key.rb', line 21 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.
15 16 17 18 19 |
# File 'lib/puppet/graph/key.rb', line 15 def next next_values = @value.clone next_values[-1] += 1 Puppet::Graph::Key.new(next_values) end |