Class: Urban::Dictionary

Inherits:
Object
  • Object
show all
Defined in:
lib/urban/dictionary.rb

Defined Under Namespace

Classes: Entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#web_serviceObject



18
19
20
# File 'lib/urban/dictionary.rb', line 18

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

Instance Method Details

#randomObject



10
11
12
# File 'lib/urban/dictionary.rb', line 10

def random
  process(web_service.random)
end

#search(phrase) ⇒ Object



14
15
16
# File 'lib/urban/dictionary.rb', line 14

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