extract the common part into beef.h; add ruby gem
update readme