Module: Urban::Dictionary

Extended by:
Dictionary
Included in:
Dictionary
Defined in:
lib/urban/dictionary.rb

Defined Under Namespace

Classes: Entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#web_serviceObject



20
21
22
# File 'lib/urban/dictionary.rb', line 20

def web_service
  @web_service ||= Urban::Web
end

Instance Method Details

#randomObject



12
13
14
# File 'lib/urban/dictionary.rb', line 12

def random
  process(web_service.random)
end

#search(phrase) ⇒ Object



16
17
18
# File 'lib/urban/dictionary.rb', line 16

def search(phrase)
  process(web_service.search(phrase))
end