Class: InOrOut::Scraper

Inherits:
Object
  • Object
show all
Defined in:
lib/in_or_out/models/scraper.rb

Instance Method Summary collapse

Instance Method Details

#scrape(url) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/in_or_out/models/scraper.rb', line 6

def scrape(url)
  a = Mechanize.new { |agent|
    agent.user_agent_alias = 'Mac Safari'
  }

  a.get(url).content
end