class NytJourneys::Data_Generator
Constants
- BASE_URL
Public Instance Methods
make_journeys()
click to toggle source
# File lib/nyt_journeys/data_generator.rb, line 4 def make_journeys type_array = NytJourneys::Scraper.scrape_type_summary_page(BASE_URL) trip_array = type_array.collect do |type| NytJourneys::Scraper.scrape_type_detail_page(type) end trip_array.flatten! NytJourneys::Journeys.create_from_collection(trip_array) end