Allow Docnmock to hook itself into another module
Refactor Api class to use a block