How to overwrite a method?

Hi,

The following file within rails
/activeresource/lib/active_resource/formats/xml_format.rb

Has the method
def extension
“xml”
end

How can I overwrite this so that it returns PHP without editing any core
file?

Thanks

On 7 Nov 2008, at 11:15, Scott A S wrote:

How can I overwrite this so that it returns PHP without editing any
core
file?

just reopen that class
class WhateverItIs
def extension
“php”
end
end