gi: extract interface -> Ruby code