Class: DuckDuckGo::SearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/duckduckgo/result.rb

Overview

This class represents a search result from DuckDuckGo.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, title, description) ⇒ SearchResult

Returns a new instance of SearchResult.



19
20
21
22
23
# File 'lib/duckduckgo/result.rb', line 19

def initialize(uri, title, description)
  @uri = uri
  @title = title
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

The description for this result.



17
18
19
# File 'lib/duckduckgo/result.rb', line 17

def description
  @description
end

#titleObject (readonly)

The title of this result.



13
14
15
# File 'lib/duckduckgo/result.rb', line 13

def title
  @title
end

#uriObject (readonly)

The URI for this result.



9
10
11
# File 'lib/duckduckgo/result.rb', line 9

def uri
  @uri
end