Class: TokyoMetro::Api::TrainTimetable::Info::StationTime::List
- Inherits:
-
MetaClass::Fundamental::List
- Object
- Array
- MetaClass::Fundamental::List
- TokyoMetro::Api::TrainTimetable::Info::StationTime::List
- Defined in:
- lib/tokyo_metro/api/train_timetable/info/station_time/list.rb
Overview
個別の駅の発着時刻情報の配列
Instance Method Summary collapse
- #station_time_info_and_index_of(station_same_as) ⇒ Object
- #stations ⇒ Object
-
#stopping_stations ⇒ Object
# @note StationTimetable::Info::TrainTime::List#seed と同じロジック def seed( id_in_db , operation_day_id ) raise “Error: #selfself.classself.class.name##__method__” self.each do | station_time | station_time.seed( id_in_db , operation_day_id ) end end.
Methods inherited from MetaClass::Fundamental::List
Instance Method Details
#station_time_info_and_index_of(station_same_as) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/tokyo_metro/api/train_timetable/info/station_time/list.rb', line 34 def station_time_info_and_index_of( station_same_as ) { station_time_in_train_timetable: station_time_info_of( station_same_as ) , index_in_train_timetable: index_of( station_same_as ) , } end |
#stations ⇒ Object
18 19 20 |
# File 'lib/tokyo_metro/api/train_timetable/info/station_time/list.rb', line 18 def stations stopping_stations.map( &:values ).flatten end |
#stopping_stations ⇒ Object
# @note StationTimetable::Info::TrainTime::List#seed と同じロジック
def seed( id_in_db , operation_day_id )
raise "Error: #{self.class.name}\##{__method__}"
self.each do | station_time |
station_time.seed( id_in_db , operation_day_id )
end
end
14 15 16 |
# File 'lib/tokyo_metro/api/train_timetable/info/station_time/list.rb', line 14 def stopping_stations self.map( &:station ) end |