Class: Shape
Instance Method Summary
collapse
Methods inherited from CUMTD
all_routes, all_stops, #api_key, #get_departures_by_stop, #get_reroutes, #get_routes, #get_routes_by_stop, #get_shape_between_stops, #get_shape_by_id, #get_stop_by_id, #get_stop_times_by_stop, #get_stop_times_by_trip, #get_stops, #get_stops_by_lat_lon, #get_stops_by_search, #get_trip_by_id, #get_trips_by_block, #get_vehicle_by_id, #get_vehicles, #get_vehicles_by_route_id, #nearest_departures, #print_all_departures, reroutes, #serialize_routes, #serialize_stops, #serialize_vehicles
Constructor Details
#initialize(json) ⇒ Shape
2
3
4
5
6
7
8
|
# File 'lib/shape.rb', line 2
def initialize(json)
@shape_dist_traveled = json["shape_dist_traveled"]
@shape_pt_lat = json["shape_pt_lat"]
@shape_pt_lon = json["shape_pt_lon"]
@shape_pt_sequence = json["shape_pt_sequence"]
@shape_stop_id = json["shape_stop_id"] if json["shape_stop_id"]
end
|
Instance Method Details
#shape_dist_traveled ⇒ Object
10
11
12
|
# File 'lib/shape.rb', line 10
def shape_dist_traveled
@shape_dist_traveled
end
|
#shape_pt_lat ⇒ Object
14
15
16
|
# File 'lib/shape.rb', line 14
def shape_pt_lat
@shape_pt_lat
end
|
#shape_pt_lon ⇒ Object
18
19
20
|
# File 'lib/shape.rb', line 18
def shape_pt_lon
@shape_pt_lon
end
|
#shape_pt_sequence ⇒ Object
22
23
24
|
# File 'lib/shape.rb', line 22
def shape_pt_sequence
@shape_pt_sequence
end
|
#shape_stop_id ⇒ Object
26
27
28
|
# File 'lib/shape.rb', line 26
def shape_stop_id
@shape_stop_id
end
|