View on GitHub


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
p "classhole" #Does a Google search for comic containing the search phrase and returns first comic result