summaryrefslogtreecommitdiffstats
path: root/lib/puppet/event.rb
blob: 16e76bf5053b1c84fa5eb0fd3f895b2076a8397e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'puppet'
require 'puppet/util/methodhelper'
require 'puppet/util/errors'

module Puppet
    # events are transient packets of information; they result in one or more (or none)
    # subscriptions getting triggered, and then they get cleared
    # eventually, these will be passed on to some central event system
	class Event
        include Puppet
        include Puppet::Util::MethodHelper
        include Puppet::Util::Errors
        
		attr_accessor :event, :source, :transaction

        @@events = []

		def initialize(args)
		    set_options symbolize_options(args)
		    requiredopts(:event, :source)
		end

        def to_s
            @source.to_s + " -> " + self.event.to_s
        end
	end
end

# $Id$