Sha256: 4147d8ff78cad8048ab993ecfe4d8e23dd597e5a2e03d052bd45a16785b304f1

Contents?: true

Size: 883 Bytes

Versions: 1

Compression:

Stored size: 883 Bytes

Contents

class TokyoMetro::Factory::Convert::Common::Api::MetaClass::TrainInfos::ChiyodaBranchLine::Info < TokyoMetro::Factory::Convert::Common::Api::MetaClass::Fundamental::Normal

  def process
    convert_railway_line_name_of_chiyoda_branch_line_train
  end

  private

  def convert_railway_line_name_of_chiyoda_branch_line_train
    if object.operated_only_on_chiyoda_branch_line_including_invalid?
      regexp_for_replace = ::TokyoMetro::Factory::Convert::Dictionary::RegexpForReplace.chiyoda_branch_line_stations

      object.instance_variable_set( :@railway_line , "odpt.Railway:TokyoMetro.ChiyodaBranch" )
      object.instance_variable_set( :@starting_station , object.starting_station.gsub( regexp_for_replace , "ChiyodaBranch" ) )
      object.instance_variable_set( :@terminal_station , object.terminal_station.gsub( regexp_for_replace , "ChiyodaBranch" ) )
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/factory/convert/common/api/meta_class/train_infos/chiyoda_branch_line/info.rb