class TokyoMetro::Factory::Convert::Patch::Api::TrainTimetable::YurakuchoLine::InternalFactory::ConvertStationName::Info::StationTime::Info

Public Instance Methods

process() click to toggle source
# File lib/tokyo_metro/factory/convert/patch/api/train_timetable/yurakucho_line/internal_factory/convert_station_name/info/station_time/info.rb, line 3
def process
  convert_station_names
end

Private Instance Methods

convert_station_names() click to toggle source
# File lib/tokyo_metro/factory/convert/patch/api/train_timetable/yurakucho_line/internal_factory/convert_station_name/info/station_time/info.rb, line 9
def convert_station_names
  set_new_station_name( :@arrival_station )
  set_new_station_name( :@departure_station )
end
set_new_station_name( instance_variable_name ) click to toggle source
# File lib/tokyo_metro/factory/convert/patch/api/train_timetable/yurakucho_line/internal_factory/convert_station_name/info/station_time/info.rb, line 16
def set_new_station_name( instance_variable_name )
  @object.instance_variable_set( instance_variable_name , station_name_new( instance_variable_name ) )
end
station_name_new( instance_variable_name ) click to toggle source
# File lib/tokyo_metro/factory/convert/patch/api/train_timetable/yurakucho_line/internal_factory/convert_station_name/info/station_time/info.rb, line 20
def station_name_new( instance_variable_name )
  station_name = @object.instance_variable_get( instance_variable_name )
  if station_name.present?
    station_name.gsub( /(?<=\Aodpt\.Station\:TokyoMetro\.)Yurakucho/ , "Fukutoshin" )
  else
    nil
  end
end