View on GitHub

Xkcd-gem

XCKD ruby gem to get random img url or comic urls

download .ZIPdownload .TGZ

Just do a gem install xkcd

And then :

require 'xkcd'
p XKCD.img   # To get random comic image URL and title
p XKCD.comic # Get the random comic URL