# File lib/puppet/provider/parsedfile.rb, line 135
135:     def self.mk_resource_methods
136:         [resource_type.validproperties, resource_type.parameters].flatten.each do |attr|
137:             attr = symbolize(attr)
138:             define_method(attr) do
139: #                if @property_hash.empty?
140: #                    # Note that this swaps the provider out from under us.
141: #                    prefetch()
142: #                    if @resource.provider == self
143: #                        return @property_hash[attr]
144: #                    else
145: #                        return @resource.provider.send(attr)
146: #                    end
147: #                end
148:                 # If it's not a valid field for this record type (which can happen
149:                 # when different platforms support different fields), then just
150:                 # return the should value, so the resource shuts up.
151:                 if @property_hash[attr] or self.class.valid_attr?(self.class.name, attr)
152:                     @property_hash[attr] || :absent
153:                 else
154:                     if defined? @resource
155:                         @resource.should(attr)
156:                     else
157:                         nil
158:                     end
159:                 end
160:             end
161: 
162:             define_method(attr.to_s + "=") do |val|
163:                 mark_target_modified
164:                 @property_hash[attr] = val
165:             end
166:         end
167:     end