plugin ruby: share common code