Class: TokyoMetro::Api::Station::Info::ConnectingRailwayLine::List
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
#seed, #to_strf
#seed
#find_by_same_as, #to_strf
Class Method Details
.factory_for_seeding_this_class ⇒ Object
4
5
6
|
# File 'lib/tokyo_metro/api/station/info/connecting_railway_line/list.rb', line 4
def self.factory_for_seeding_this_class
factory_for_seeding_connecting_railway_lines_of_each_station
end
|
Instance Method Details
#railway_lines ⇒ Object
19
20
21
|
# File 'lib/tokyo_metro/api/station/info/connecting_railway_line/list.rb', line 19
def railway_lines
self.map( &:railway_line )
end
|
#set_index_in_station! ⇒ Object
8
9
10
11
12
13
|
# File 'lib/tokyo_metro/api/station/info/connecting_railway_line/list.rb', line 8
def set_index_in_station!
self.each.with_index(1) do | connecting_railway_line , i |
connecting_railway_line.send( :set_index_in_station , i )
end
return self
end
|
#sort! ⇒ Object
15
16
17
|
# File 'lib/tokyo_metro/api/station/info/connecting_railway_line/list.rb', line 15
def sort!
self.sort_by!( &:index_in_station )
end
|