Class: CTA::Calendar

Inherits:
Object
  • Object
show all
Defined in:
lib/cta_redux/models/calendar.rb

Overview

Note:

Current columns: [:service_id, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :start_date, :end_date]

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

Instance Method Summary collapse

Instance Method Details

#end_dateDate

Returns:

  • (Date)

# File 'lib/cta_redux/models/calendar.rb', line 9

#fridaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#mondaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#saturdaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#service_idString

Returns:

  • (String)

# File 'lib/cta_redux/models/calendar.rb', line 9

#start_dateDate

Returns:

  • (Date)

# File 'lib/cta_redux/models/calendar.rb', line 9

#sundaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#thursdaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#tripsArray<CTA::Trip>

A CTA::Calendar defines a time period during which multiple Trips may or may not be active.

Returns:


33
# File 'lib/cta_redux/models/calendar.rb', line 33

one_to_many :trips, :key => :service_id

#tuesdaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9

#wednesdaytrue, false

Returns:

  • (true, false)

# File 'lib/cta_redux/models/calendar.rb', line 9