Method: Puppet::Transaction::Event#initialize_from_hash
- Defined in:
- lib/puppet/transaction/event.rb
#initialize_from_hash(data) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/puppet/transaction/event.rb', line 70 def initialize_from_hash(data) data = Puppet::Pops::Serialization::FromDataConverter.convert(data, { :allow_unresolved => true, :loader => Puppet::Pops::Loaders.static_loader }) @audited = data['audited'] @property = data['property'] @previous_value = data['previous_value'] @desired_value = data['desired_value'] @historical_value = data['historical_value'] @message = data['message'] @name = data['name'].intern if data['name'] @status = data['status'] @time = data['time'] @time = Time.parse(@time) if @time.is_a? String @redacted = data.fetch('redacted', false) @corrective_change = data['corrective_change'] end |