Class: TokyoMetro::Factory::Convert::Common::Api::Station::StationCode

Inherits:
MetaClass::Fundamental::Normal show all
Defined in:
lib/tokyo_metro/factory/convert/common/api/station/station_code.rb

Instance Attribute Summary

Attributes inherited from MetaClass::Fundamental

#object

Instance Method Summary collapse

Methods inherited from MetaClass::Fundamental::Normal

process

Constructor Details

#initialize(object, station_same_as, station_code_new) ⇒ StationCode

Returns a new instance of StationCode.



3
4
5
6
7
# File 'lib/tokyo_metro/factory/convert/common/api/station/station_code.rb', line 3

def initialize( object , station_same_as , station_code_new )
  super( object )
  @station_same_as = station_same_as
  @station_code_new = station_code_new
end

Instance Method Details

#processObject



9
10
11
12
13
# File 'lib/tokyo_metro/factory/convert/common/api/station/station_code.rb', line 9

def process
  if object.same_as == @station_same_as
    object.instance_variable_set( :@station_code , "m06" )
  end
end