Class: StopPoint

Inherits:
CUMTD show all
Defined in:
lib/stop_point.rb

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) ⇒ StopPoint

Returns a new instance of StopPoint.



2
3
4
5
6
7
8
# File 'lib/stop_point.rb', line 2

def initialize(json)
	@code = json["code"]
	@stop_id = json["stop_id"]
	@stop_lat = json["stop_lat"]
	@stop_lon = json["stop_lon"]
	@stop_name = json["stop_name"]
end

Instance Method Details

#codeObject



10
11
12
# File 'lib/stop_point.rb', line 10

def code
	@code
end

#stop_idObject



14
15
16
# File 'lib/stop_point.rb', line 14

def stop_id
	@stop_id
end

#stop_latObject



18
19
20
# File 'lib/stop_point.rb', line 18

def stop_lat
	@stop_lat
end

#stop_lonObject



22
23
24
# File 'lib/stop_point.rb', line 22

def stop_lon
	@stop_lon
end

#stop_nameObject



26
27
28
# File 'lib/stop_point.rb', line 26

def stop_name
	@stop_name
end