ruby: Translate C examples into Ruby and include documentation.