Class: ConfedScraper::Scraper
- Inherits:
-
Object
- Object
- ConfedScraper::Scraper
- Defined in:
- lib/confed_scraper/scraper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #get_content_from(url) ⇒ Object
-
#initialize(url) ⇒ Scraper
constructor
A new instance of Scraper.
- #process(url) ⇒ Object
- #scrape_message(url) ⇒ Object
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
#url ⇒ Object (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 (url) p "Scraping: #{url}" end |