lukebyrne/betfair — pull request #3 by regularfry (2012-02-27 23:33:50+00:00)
Title: Refactored Betfair::API to separate SOAP out and make it a bit easier to read

This is the sort of thing I was thinking of in terms of a local refactor. I've pulled out the bits that package up the request into Betfair's standard wrapper structure (`"bf:request" => stuff` and so on) and turned them into their own class, and made it so that you don't need to drop into a block to define the request body, which simplifies the individual API methods quite a lot. I don't *think* this prevents us from implementing any more of the API methods that we haven't needed yet, but let me know if you spot anything.

It might look like quite a radical change, but the code's actually doing precisely the same thing as it was. Oh, and all the specs still pass :-)