Skip to content

tmiller/urban

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

176 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Urban is a command line tool that allows you to look up definitions or pull a random definition from Urban Dictionary.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors