Class: GoTransit::ServiceUpdate::UnionDepartures::Trip

Inherits:
ApiResource
  • Object
show all
Defined in:
lib/go_transit/resources/service_update/union_departures/trip.rb

Defined Under Namespace

Classes: Stop

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiResource

#initialize

Constructor Details

This class inherits a constructor from GoTransit::ApiResource

Instance Attribute Details

#infoObject

Returns the value of attribute info.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def info
  @info
end

#platformObject

Returns the value of attribute platform.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def platform
  @platform
end

#serviceObject

Returns the value of attribute service.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def service
  @service
end

#service_typeObject

Returns the value of attribute service_type.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def service_type
  @service_type
end

#stopsObject

Returns the value of attribute stops.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def stops
  @stops
end

#timeObject

Returns the value of attribute time.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def time
  @time
end

#trip_numberObject

Returns the value of attribute trip_number.



3
4
5
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 3

def trip_number
  @trip_number
end

Instance Method Details

#platformsObject



6
7
8
9
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 6

def platforms
  return if platform == "-"
  platform.split("&").collect(&:strip)
end

#time_utcObject



11
12
13
# File 'lib/go_transit/resources/service_update/union_departures/trip.rb', line 11

def time_utc
  to_utc(time)
end