Class: TokyoMetro::Factory::Convert::Common::Api::MetaClass::StationInfos::RailwayLine

Inherits:
Object
  • Object
show all
Defined in:
lib/tokyo_metro/factory/convert/common/api/meta_class/station_infos/railway_line.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info, list, replacing_dictionary, ignored_dictionary) ⇒ RailwayLine

Returns a new instance of RailwayLine.



3
4
5
6
7
8
# File 'lib/tokyo_metro/factory/convert/common/api/meta_class/station_infos/railway_line.rb', line 3

def initialize( info , list , replacing_dictionary , ignored_dictionary )
  @info = info
  @list = list
  @replacing_dictionary = replacing_dictionary
  @ignored_dictionary = ignored_dictionary
end

Class Method Details

.process(*args) ⇒ Object



22
23
24
# File 'lib/tokyo_metro/factory/convert/common/api/meta_class/station_infos/railway_line.rb', line 22

def self.process( *args )
  self.new( *args ).process
end

Instance Method Details

#processObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/tokyo_metro/factory/convert/common/api/meta_class/station_infos/railway_line.rb', line 10

def process
  if to_replace?
    replacing_railway_lines_for_this_instance.each do | replacing_railway_line_name |
      @list << railway_line_info_after_conversion( replacing_railway_line_name )
    end
  else
    unless to_ignore?
      @list << @info
    end
  end
end