Class: Google::CustomSearch::JSON::Result
- Inherits:
-
Object
- Object
- Google::CustomSearch::JSON::Result
- Defined in:
- lib/google/custom_search/json/results.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(data) ⇒ Result
constructor
A new instance of Result.
- #site ⇒ Object
- #title ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(data) ⇒ Result
Returns a new instance of Result.
78 79 80 |
# File 'lib/google/custom_search/json/results.rb', line 78 def initialize(data) @data = data end |
Instance Method Details
#content ⇒ Object
90 91 92 |
# File 'lib/google/custom_search/json/results.rb', line 90 def content @data['htmlSnippet'] end |
#site ⇒ Object
94 95 96 |
# File 'lib/google/custom_search/json/results.rb', line 94 def site @data['displayLink'] end |
#title ⇒ Object
82 83 84 |
# File 'lib/google/custom_search/json/results.rb', line 82 def title @data['title'] || '' end |
#uri ⇒ Object
86 87 88 |
# File 'lib/google/custom_search/json/results.rb', line 86 def uri @data['link'] end |