Class: Itinerary::ScrapeBriar
- Inherits:
-
Tool
- Object
- Tool
- Itinerary::ScrapeBriar
show all
- Defined in:
- lib/itinerary/tools/scrape-briar.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Tool
find_tool, inherited, #initialize, tools
Class Method Details
.name ⇒ Object
4
5
6
|
# File 'lib/itinerary/tools/scrape-briar.rb', line 4
def self.name
'scrape-briar'
end
|
Instance Method Details
#parse(args) ⇒ Object
8
9
10
|
# File 'lib/itinerary/tools/scrape-briar.rb', line 8
def parse(args)
@states = args
end
|
#run ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/itinerary/tools/scrape-briar.rb', line 12
def run
scraper = BriarScraper.new
@states.each do |state|
recs = scraper.scrape_state(state)
;;puts "Scraped #{recs.length} recs from state #{state.inspect}"
recs.each do |rec|
@itinerary << rec
;;puts rec.to_text
end
end
end
|