Class: GoTransit::ServiceAtAGlance::Trip

Inherits:
ApiResource show all
Defined in:
lib/go_transit/resources/service_at_a_glance/trip.rb

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

#at_station_codeObject

Returns the value of attribute at_station_code.



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

def at_station_code
  @at_station_code
end

#bus_typeObject

Returns the value of attribute bus_type.



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

def bus_type
  @bus_type
end

#carsObject

Returns the value of attribute cars.



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

def cars
  @cars
end

#courseObject

Returns the value of attribute course.



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

def course
  @course
end

#delay_secondsObject

Returns the value of attribute delay_seconds.



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

def delay_seconds
  @delay_seconds
end

#displayObject

Returns the value of attribute display.



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

def display
  @display
end

#end_timeObject

Returns the value of attribute end_time.



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

def end_time
  @end_time
end

#first_stop_codeObject

Returns the value of attribute first_stop_code.



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

def first_stop_code
  @first_stop_code
end

#is_in_motionObject

Returns the value of attribute is_in_motion.



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

def is_in_motion
  @is_in_motion
end

#last_stop_codeObject

Returns the value of attribute last_stop_code.



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

def last_stop_code
  @last_stop_code
end

#latitudeObject

Returns the value of attribute latitude.



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

def latitude
  @latitude
end

#line_codeObject

Returns the value of attribute line_code.



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

def line_code
  @line_code
end

#longitudeObject

Returns the value of attribute longitude.



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

def longitude
  @longitude
end

#modified_dateObject

Returns the value of attribute modified_date.



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

def modified_date
  @modified_date
end

#next_stop_codeObject

Returns the value of attribute next_stop_code.



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

def next_stop_code
  @next_stop_code
end

#occupancy_percentageObject

Returns the value of attribute occupancy_percentage.



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

def occupancy_percentage
  @occupancy_percentage
end

#prev_stop_codeObject

Returns the value of attribute prev_stop_code.



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

def prev_stop_code
  @prev_stop_code
end

#route_numberObject

Returns the value of attribute route_number.



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

def route_number
  @route_number
end

#start_timeObject

Returns the value of attribute start_time.



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

def start_time
  @start_time
end

#trip_numberObject

Returns the value of attribute trip_number.



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

def trip_number
  @trip_number
end

#variant_dirObject

Returns the value of attribute variant_dir.



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

def variant_dir
  @variant_dir
end

Instance Method Details

#in_motion?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/go_transit/resources/service_at_a_glance/trip.rb', line 10

def in_motion?
  is_in_motion
end

#modified_date_utcObject



14
15
16
# File 'lib/go_transit/resources/service_at_a_glance/trip.rb', line 14

def modified_date_utc
  to_utc(modified_date)
end