class Lyracyst::Urban
Urban
Dictionary is a crowd-sourced dictionary that focuses on slang and colloquialisms.
Public Instance Methods
get_word(search, result)
click to toggle source
Fetches URL.
@param search [String] The word or phrase to search for. @param result [String] The search response.
# File lib/lyracyst/urban.rb, line 9 def get_word(search, result) prefix = 'http://api.urbandictionary.com/v0/define?term=' url = "#{prefix}#{search}" request = HTTPI::Request.new(url) getter = HTTPI.get(request) result = getter.body end