Class: DuckDuckGo::SearchResult
- Inherits:
-
Object
- Object
- DuckDuckGo::SearchResult
- Defined in:
- lib/duckduckgo/result.rb
Overview
This class represents a search result from DuckDuckGo.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
The description for this result.
-
#title ⇒ Object
readonly
The title of this result.
-
#uri ⇒ Object
readonly
The URI for this result.
Instance Method Summary collapse
-
#initialize(uri, title, description) ⇒ SearchResult
constructor
A new instance of SearchResult.
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
#description ⇒ Object (readonly)
The description for this result.
17 18 19 |
# File 'lib/duckduckgo/result.rb', line 17 def description @description end |
#title ⇒ Object (readonly)
The title of this result.
13 14 15 |
# File 'lib/duckduckgo/result.rb', line 13 def title @title end |
#uri ⇒ Object (readonly)
The URI for this result.
9 10 11 |
# File 'lib/duckduckgo/result.rb', line 9 def uri @uri end |