Method: Puppet::Resource::Status#initialize

Defined in:
lib/puppet/resource/status.rb

#initialize(resource) ⇒ Status

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.

Returns a new instance of Status.



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/puppet/resource/status.rb', line 156

def initialize(resource)
  @real_resource = resource
  @source_description = resource.path
  @containment_path = resource.pathbuilder
  @resource = resource.to_s
  @change_count = 0
  @out_of_sync_count = 0
  @changed = false
  @out_of_sync = false
  @skipped = false
  @failed = false
  @corrective_change = false

  @file = resource.file
  @line = resource.line

  merge_tags_from(resource)
  @time = Time.now
  @events = []
  @resource_type = resource.type.to_s.capitalize
  @provider_used = resource.provider.class.name.to_s unless resource.provider.nil?
  @title = resource.title
end