Class: Puppet::Graph::Prioritizer Private
- Defined in:
- lib/puppet/graph/prioritizer.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.
Base, template method, class for Prioritizers. This provides the basic tracking facilities used.
Direct Known Subclasses
RandomPrioritizer, SequentialPrioritizer, TitleHashPrioritizer
Instance Method Summary collapse
- #forget(key) ⇒ Object private
- #generate_priority_contained_in(container, key) ⇒ Object private
- #generate_priority_for(key) ⇒ Object private
-
#initialize ⇒ Prioritizer
constructor
private
A new instance of Prioritizer.
- #priority_of(key) ⇒ Object private
- #record_priority_for(key, priority) ⇒ Object private
Constructor Details
#initialize ⇒ Prioritizer
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 Prioritizer.
6 7 8 |
# File 'lib/puppet/graph/prioritizer.rb', line 6 def initialize @priority = {} end |
Instance Method Details
#forget(key) ⇒ 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.
10 11 12 |
# File 'lib/puppet/graph/prioritizer.rb', line 10 def forget(key) @priority.delete(key) end |
#generate_priority_contained_in(container, key) ⇒ 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.
22 23 24 |
# File 'lib/puppet/graph/prioritizer.rb', line 22 def generate_priority_contained_in(container, key) raise NotImplementedError end |
#generate_priority_for(key) ⇒ 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.
18 19 20 |
# File 'lib/puppet/graph/prioritizer.rb', line 18 def generate_priority_for(key) raise NotImplementedError end |
#priority_of(key) ⇒ 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.
26 27 28 |
# File 'lib/puppet/graph/prioritizer.rb', line 26 def priority_of(key) @priority[key] end |
#record_priority_for(key, priority) ⇒ 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.
14 15 16 |
# File 'lib/puppet/graph/prioritizer.rb', line 14 def record_priority_for(key, priority) @priority[key] = priority end |