Sha256: 61a28f43ea650e143f6a056fa72d40fd756db02422503fcb8448fde2c92df00f

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

class TokyoMetro::Factory::Convert::Common::Api::StationFacility::Platform::Transfer < TokyoMetro::Factory::Convert::Common::Api::MetaClass::Converter

  def initialize( info , railway_line , railway_direction , necessary_time )
    raise unless info.present?
    @info = info
    @railway_line_for_conversion = self.class.class_of_info_for_conversion.new( railway_line , :railway_line , :string? )
    @railway_direction_for_conversion = self.class.class_of_info_for_conversion.new( railway_direction , :railway_direction , :string? )
    @necessary_time_for_conversion = self.class.class_of_info_for_conversion.new( necessary_time , :necessary_time , :integer? )
  end

  def self.process( info , railway_line: nil , railway_direction: nil , necessary_time: nil )
    self.new( info , railway_line , railway_direction , necessary_time ).process
  end

  private

  def infos_for_conversion
    [ @railway_line_for_conversion , @railway_direction_for_conversion , @necessary_time_for_conversion ]
  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/station_facility/platform/transfer.rb