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