[feature] new style API for ruby extension