Class: Google::CustomSearch::JSON::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/google/custom_search/json/results.rb

Instance Method Summary collapse

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

#contentObject



90
91
92
# File 'lib/google/custom_search/json/results.rb', line 90

def content
  @data['htmlSnippet']
end

#siteObject



94
95
96
# File 'lib/google/custom_search/json/results.rb', line 94

def site
  @data['displayLink']
end

#titleObject



82
83
84
# File 'lib/google/custom_search/json/results.rb', line 82

def title
  @data['title'] || ''
end

#uriObject



86
87
88
# File 'lib/google/custom_search/json/results.rb', line 86

def uri
  @data['link']
end