Class: TokyoMetro::Api::TrainOperation::List
- Inherits:
-
MetaClass::RealTime::List
- Object
- Array
- MetaClass::Fundamental::List
- MetaClass::RealTime::List
- TokyoMetro::Api::TrainOperation::List
- Includes:
- ClassNameLibrary::Api::TrainOperation
- Defined in:
- lib/tokyo_metro/api/train_operation/list.rb
Overview
各路線の列車運行情報を格納する配列
Instance Method Summary collapse
- #railway_lines ⇒ Object (also: #railway_lines_same_as)
-
#sort_by_railway_line_order ⇒ List
各路線の情報を路線の建設順に並べ替えるメソッド.
- #update!(http_client, time: ::TokyoMetro.time_now) ⇒ Object
Methods inherited from MetaClass::RealTime::List
Methods inherited from MetaClass::Fundamental::List
Instance Method Details
#railway_lines ⇒ Object Also known as: railway_lines_same_as
12 13 14 |
# File 'lib/tokyo_metro/api/train_operation/list.rb', line 12 def railway_lines self.map( &:railway_line ) end |
#sort_by_railway_line_order ⇒ List
各路線の情報を路線の建設順に並べ替えるメソッド
8 9 10 |
# File 'lib/tokyo_metro/api/train_operation/list.rb', line 8 def sort_by_railway_line_order self.class.new( self.sort_by { | line_info | ::TokyoMetro::Static.railway_lines[ line_info.railway_line ].order } ) end |
#update!(http_client, time: ::TokyoMetro.time_now) ⇒ Object
18 19 20 |
# File 'lib/tokyo_metro/api/train_operation/list.rb', line 18 def update!( http_client , time: ::TokyoMetro.time_now ) super( http_client , time: time ) end |