diff options
| author | Paul Berry <paul@puppetlabs.com> | 2011-01-03 15:45:41 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2011-01-03 15:49:28 -0800 |
| commit | e162da905549002d31eb9ff159406cec8b659046 (patch) | |
| tree | bca0d883123ad1a81f40a4073b4a95496cffe05d /lib/puppet | |
| parent | f1abd3c16eccfac60a19462a244c55924b737c2d (diff) | |
| download | puppet-e162da905549002d31eb9ff159406cec8b659046.tar.gz puppet-e162da905549002d31eb9ff159406cec8b659046.tar.xz puppet-e162da905549002d31eb9ff159406cec8b659046.zip | |
Prep work for #5758: clean up initializer for Puppet::Transaction::Event
Puppet::Transaction::Event#initialize() contained unnecessary code
that allowed the properties of an event to be passed in as separate
arguments. This was never used.
Paired-with: Matt Robinson <matt@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/transaction/event.rb | 5 |
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 |
