call class_eval method with block instead of with string