# File lib/puppet/provider/naginator.rb, line 44 44: def initialize(resource = nil) 45: if resource.is_a?(Nagios::Base) 46: # We don't use a duplicate here, because some providers (ParsedFile, at least) 47: # use the hash here for later events. 48: @property_hash = resource 49: elsif resource 50: @resource = resource if resource 51: # LAK 2007-05-09: Keep the model stuff around for backward compatibility 52: @model = resource 53: @property_hash = self.class.nagios_type.new 54: else 55: @property_hash = self.class.nagios_type.new 56: end 57: end