Class: ScreenScraper

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

Instance Method Summary collapse

Constructor Details

#initializeScreenScraper

Returns a new instance of ScreenScraper.



5
6
7
8
# File 'lib/screen_scraper.rb', line 5

def initialize
  @gulesider = "http://www.gulesider.no/finn:"
  @agent = Mechanize.new
end

Instance Method Details

#search(number) ⇒ Object



10
11
12
13
14
15
# File 'lib/screen_scraper.rb', line 10

def search number
  search_webpage_for number
  
  return scraped_person_data if number_belongs_to_a_person?
  return scraped_company_data
end