Class: PuppetX::Relay::Agent::Job::Work
- Inherits:
- 
      Object
      
        - Object
- PuppetX::Relay::Agent::Job::Work
 
- Includes:
- Enumerable
- Defined in:
- lib/puppet_x/relay/agent/job/work.rb
Instance Method Summary collapse
- #add(item, interval = 0) ⇒ Object
- #each(&block) ⇒ Object
- 
  
    
      #initialize  ⇒ Work 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Work. 
Constructor Details
#initialize ⇒ Work
Returns a new instance of Work.
| 12 13 14 | # File 'lib/puppet_x/relay/agent/job/work.rb', line 12 def initialize @jobs = Set.new.compare_by_identity end | 
Instance Method Details
#add(item, interval = 0) ⇒ Object
| 18 19 20 21 22 | # File 'lib/puppet_x/relay/agent/job/work.rb', line 18 def add(item, interval = 0) elim_disabled @jobs << item.to_job(interval) self end | 
#each(&block) ⇒ Object
| 24 25 26 27 28 | # File 'lib/puppet_x/relay/agent/job/work.rb', line 24 def each(&block) elim_disabled @jobs.each(&block) self end |