Sha256: cc4953950cf93a20f1c161bfd7fd66e4bfefdb2dc9d977dc6c5bd5145613490c
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
class TokyoMetro::Factory::Convert::Customize::Api::StationFacility::MarunouchiBranchLine::Info < TokyoMetro::Factory::Convert::Common::Api::MetaClass::Fundamental::Normal def process if to_convert? convert_railway_line_name_of_platform_infos_to_marunouchi_branch_line end end private def convert_railway_line_name_of_platform_infos_to_marunouchi_branch_line railway_lines = { main: ::TokyoMetro::Modules::Common::Dictionary::RailwayLine::StringInfo.marunouchi_same_as , branch: ::TokyoMetro::Modules::Common::Dictionary::RailwayLine::StringInfo.marunouchi_branch_same_as } @object.platform_infos.each do | platform_info | if platform_info.railway_line == railway_lines[ :main ] and platform_info.car_composition == 3 platform_info.instance_variable_set( :@railway_line , railway_lines[ :branch ] ) end end end def to_convert? list = ::TokyoMetro::Modules::Common::Dictionary::Station::StringList.between_honancho_and_nakano_shimbashi_in_system.map { | sta | "odpt.StationFacility:TokyoMetro.#{ sta }"} list.include?( @object.same_as ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tokyo_metro-0.10.1 | lib/tokyo_metro/factory/convert/customize/api/station_facility/marunouchi_branch_line/info.rb |