Class: Gtfskit::DataParser

Inherits:
Object
  • Object
show all
Defined in:
lib/gtfskit/data_parser.rb

Constant Summary collapse

VALID_FILENAMES =
%w(
  agency stops routes trips stop_times calendar calendar_dates fare_attributes 
  fare_rules timeframes fare_media fare_products fare_leg_rules fare_transfer_rules 
  areas stop_areas networks route_networks shapes frequencies transfers pathways 
  levels translations feed_info attributions
).to_set
ATTRIBUTE_PREFIX =
{
  "agency"          => "agency_",
  "calendar"        => "",
  "calendar_dates"  => "",
  "stops"           => "stop_",
  "stop_times"      => "",
  "routes"          => "route_",
  "trips"           => "trip_"
}

Class Method Summary collapse

Class Method Details

.parse(filepath:) ⇒ Object



24
25
26
27
# File 'lib/gtfskit/data_parser.rb', line 24

def parse(filepath:)
  validate_filepath(filepath)
  generate_instances(filepath)
end