Pregroups and hyperbolicity