- Bug Tracker
Urban is a command line utility with an API to query definitions from Urban Dictionary.
<img src=“https://secure.travis-ci.org/tmiller/urban.png”/> <img src=“https://codeclimate.com/github/tmiller/urban.png” />
-
Ruby >= 1.8.7
With Rubygems:
$ sudo gem install urban
With git and local working copy
$ git clone git://github.com/tmiller/urban.git $ cd urban $ sudo rake install
$ urban cookie monster
$ urban -r $ urban --random
$ urban -a cookie monster $ urban -ra
$ urban -u cookie monster $ urban -ru
$ urban --help $ urban --version
require 'urban' # Search for a word entry = Urban::Dictionary.search('impromtpu') # Get a random word entry = Urban::Dictionary.random puts entry.phrase # print the phrase puts entry.url # print the url of the phrase # print all of the definitions entry.definitions.each do |definition| puts definition end
Copyright © 2011 Thomas Miller. See LICENSE for details.