thoughtworks/pacto — pull request #77 by marcosccm (2013-12-30 20:09:49+00:00)
Title: Turn contract list into a class

My intent with this PR is twofold:

- Make the code on the Pacto root module easier to follow. Currently you have to grep to find where the principal methods, like `Pacto#use` and `Pacto#register_all` are defined. While the root Pacto shouldn't contain any logic, I think it needs to delegate explicitly the work, so you can easily follow the code path.

- Turn the contract list concept into a proper class. When everything is part of the same module, it gets hard to see where are the boundaries in the system and a change in one place has a higher probability of impacting other areas. As a bonus it gets easier to make calls to config methods like use chainable.