Class: CTA::Shape

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/cta_redux/models/shape.rb

Overview

Note:

Current columns: [:shape_id, :shape_pt_lat, :shape_pt_lon, :shape_pt_sequence, :shape_dist_traveled]

A Sequel::Model. This corresponds to routes.txt in the GTFS feed, though the CTA does not fully implement the standard.

Instance Method Summary collapse

Instance Method Details

#shape_dist_traveledInteger Also known as: distance, distance_traveled

Returns:

  • (Integer)

19
# File 'lib/cta_redux/models/shape.rb', line 19

alias_method :id, :shape_id

#shape_idInteger Also known as: id

Returns:

  • (Integer)

19
# File 'lib/cta_redux/models/shape.rb', line 19

alias_method :id, :shape_id

#shape_pt_latFloat Also known as: lat

Returns:

  • (Float)

19
# File 'lib/cta_redux/models/shape.rb', line 19

alias_method :id, :shape_id

#shape_pt_lonFloat Also known as: lon

Returns:

  • (Float)

19
# File 'lib/cta_redux/models/shape.rb', line 19

alias_method :id, :shape_id

#shape_pt_sequenceInteger Also known as: sequence

Returns:

  • (Integer)

19
# File 'lib/cta_redux/models/shape.rb', line 19

alias_method :id, :shape_id

#tripsArray<CTA::Trip>

Returns All Trips related to this CTA::Shape.

Returns:


28
# File 'lib/cta_redux/models/shape.rb', line 28

one_to_many :trips, :key => :shape_id