class StopTime

Public Class Methods

new(json) click to toggle source
# File lib/stop_time.rb, line 4
def initialize(json)
        @arrival_time = DateTime.parse(json["arrival_time"]).to_time
        @departure_time = DateTime.parse(json["departure_time"]).to_time
        @stop_sequence = json["stop_sequence"]
        @stop_point = StopPoint.new(json["stop_point"]) if json["stop_point"]
        @trip = Trip.new(json["trip"]) if json["trip"]
end

Public Instance Methods

arrival_time() click to toggle source
# File lib/stop_time.rb, line 12
def arrival_time
        @arrival_time
end
departure_time() click to toggle source
# File lib/stop_time.rb, line 16
def departure_time
        @departure_time
end
stop_point() click to toggle source
# File lib/stop_time.rb, line 24
def stop_point
        @stop_point
end
stop_sequence() click to toggle source
# File lib/stop_time.rb, line 20
def stop_sequence
        @stop_sequence
end
trip() click to toggle source
# File lib/stop_time.rb, line 28
def trip
        @trip
end