On 11 Sep 2008, at 09:42, Francis Fish wrote:
> I also wrote this to dump a string into a file (good for debugging > XML output and creating files to send to people) and put it in > my .irbrc > > http://www.pastie.org/270334 I fleshed this idea out a bit! http://aviewfromafar.net/2008/9/11/send-to_s-and-inspect-to-a-file-in-irb Easy to make it work for any object, and I added support for inspect too Could even go as far as automatically creating a #to_X_to_file method for every #to_X method, eg #to_xml, #to_json. But it's not that hard to go object.to_xml.to_file Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nwrug-members?hl=en -~----------~----~----~----~------~----~------~--~---
