Sha256: d3bd232847c225543d2e0ad4b00b3042e8300feabba1b3164ba3322098040d8b

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

module GTFS
  class Realtime
    class StopTimeUpdate < GTFS::Realtime::Model
      belongs_to :stop
      belongs_to :trip_update
      has_one :trip, through: :trip_update
      has_one :route, through: :trip_update

      def arrival_time
        super ? super.in_time_zone(Time.zone) : nil
      end

      def departure_time
        super ? super.in_time_zone(Time.zone) : nil
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gtfs-realtime-0.4.0 lib/gtfs/realtime/stop_time_update.rb