~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to lib/puppet/transaction/event.rb

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mfrom: (1.1.8 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080726154345-c03m49twzxewdwjn
Tags: 0.24.5-2
* Fix puppetlast to work with 0.24.5
* Adjust logcheck to match against new log messages in 0.24.5
* Update standards version to 3.8.0 (no changes)
* Update changelog to reduce length of line to make lintian happy

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'puppet'
 
2
require 'puppet/util/methodhelper'
 
3
require 'puppet/util/errors'
 
4
 
 
5
# events are transient packets of information; they result in one or more (or none)
 
6
# subscriptions getting triggered, and then they get cleared
 
7
# eventually, these will be passed on to some central event system
 
8
class Puppet::Transaction::Event
 
9
    include Puppet::Util::MethodHelper
 
10
    include Puppet::Util::Errors
 
11
    
 
12
    attr_reader :name, :source
 
13
 
 
14
    def initialize(name, source)
 
15
        @name, @source = name, source
 
16
    end
 
17
 
 
18
    def to_s
 
19
        source.to_s + " -> " + name.to_s
 
20
    end
 
21
end