Class: Googling::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/googling/search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keywords) ⇒ Search

Returns a new instance of Search.



9
10
11
# File 'lib/googling/search.rb', line 9

def initialize(keywords)  
  @keywords = keywords.to_s.to_uri 
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



8
9
10
# File 'lib/googling/search.rb', line 8

def list
  @list
end

#responseObject (readonly)

Returns the value of attribute response.



8
9
10
# File 'lib/googling/search.rb', line 8

def response
  @response
end

Instance Method Details

#executeObject



13
14
15
16
# File 'lib/googling/search.rb', line 13

def execute
  make_request
  parse_results
end