Class: ConfedScraper::Scraper

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

Direct Known Subclasses

ConfreaksScraper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Scraper

Returns a new instance of Scraper.



5
6
7
# File 'lib/confed_scraper/scraper.rb', line 5

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/confed_scraper/scraper.rb', line 3

def url
  @url
end

Instance Method Details

#get_content_from(url) ⇒ Object



12
13
14
# File 'lib/confed_scraper/scraper.rb', line 12

def get_content_from(url)
  RestClient.get(url)
end

#process(url) ⇒ Object



9
10
# File 'lib/confed_scraper/scraper.rb', line 9

def process(url)
end

#scrape_message(url) ⇒ Object



16
17
18
# File 'lib/confed_scraper/scraper.rb', line 16

def scrape_message(url)
  p "Scraping: #{url}"
end