Display ruby version from rvm in the prompt, function-extracted

This is a pass at abstracting the ruby version logic into another function as per @holman's suggestion on #89 - thanks @i8ramin for the code.

Fixes #89