Ruby topology

Add Ruby APIs on C topology API (#273).

This pull request depend on #258, #273.