cleaned up ruby code
Merge pull request #7 from nifengle/ruby-cleanup

cleaned up ruby code