port tweetawatt to ruby