Class: SimpleGoogleCustomSearch::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Result

Returns a new instance of Result.



4
5
6
7
8
# File 'lib/simple_google_custom_search/result.rb', line 4

def initialize(attrs={})
  @title = attrs[:title] || ''
  @link = attrs[:link] || ''
  @description = attrs[:description] || ''
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/simple_google_custom_search/result.rb', line 2

def description
  @description
end

Returns the value of attribute link.



2
3
4
# File 'lib/simple_google_custom_search/result.rb', line 2

def link
  @link
end

#titleObject

Returns the value of attribute title.



2
3
4
# File 'lib/simple_google_custom_search/result.rb', line 2

def title
  @title
end