summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/transaction/event.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/puppet/transaction/event.rb b/lib/puppet/transaction/event.rb
index 64980f1d9..cd695cff8 100644
--- a/lib/puppet/transaction/event.rb
+++ b/lib/puppet/transaction/event.rb
@@ -16,10 +16,9 @@ class Puppet::Transaction::Event
EVENT_STATUSES = %w{noop success failure audit}
- def initialize(*args)
+ def initialize(options = {})
@audited = false
- options = args.last.is_a?(Hash) ? args.pop : ATTRIBUTES.inject({}) { |hash, attr| hash[attr] = args.pop; hash }
- options.each { |attr, value| send(attr.to_s + "=", value) unless value.nil? }
+ options.each { |attr, value| send(attr.to_s + "=", value) }
@time = Time.now
end