Class: PostScraper
- Inherits:
-
Object
- Object
- PostScraper
- Defined in:
- lib/craigslister/post_scraper.rb
Overview
Scrapes craigslist posts and packages data in Post objects
Instance Method Summary collapse
-
#initialize(page, link) ⇒ PostScraper
constructor
A new instance of PostScraper.
- #new_post ⇒ Object
Constructor Details
#initialize(page, link) ⇒ PostScraper
Returns a new instance of PostScraper.
3 4 5 6 |
# File 'lib/craigslister/post_scraper.rb', line 3 def initialize(page, link) @page = page @link = link end |
Instance Method Details
#new_post ⇒ Object
8 9 10 |
# File 'lib/craigslister/post_scraper.rb', line 8 def new_post Post.new(post_params) end |