Module: TokyoMetro::Modules::Api::Info::Decision::TrainOperationDay
- Included in:
- Api::TrainTimetable::Info
- Defined in:
- lib/tokyo_metro/modules/api/info/decision/train_operation_day.rb
運行日に関するメソッド collapse
-
#operation_day_in_db ⇒ ::OperationDay
運行日のDBでのインスタンス.
Methods included from Common::Info::Decision::TrainOperationDay
#operated_on?, #operated_on_saturdays_and_holidays?, #operated_on_weekdays?
Instance Method Details
#operation_day_in_db ⇒ ::OperationDay
運行日のDBでのインスタンス
9 10 11 12 13 14 15 16 17 |
# File 'lib/tokyo_metro/modules/api/info/decision/train_operation_day.rb', line 9 def operation_day_in_db if operated_on_weekdays? ::OperationDay.find_by_name_en( ::TokyoMetro::Static.operation_days.weekday.en ) elsif operated_on_saturdays_and_holidays? ::OperationDay.find_by_name_en( ::TokyoMetro::Static.operation_days.saturday_and_holiday.en ) else raise "Error" end end |