Sha256: 4e1bd0e7861474cd7939d9003c7c4efd64fad943f735521c2d23bb7dff177ab6

Contents?: true

Size: 906 Bytes

Versions: 1

Compression:

Stored size: 906 Bytes

Contents

class TokyoMetro::Factory::Seed::Api::StationFacility::Info::Platform::Info < TokyoMetro::Factory::Seed::Api::StationFacility::Info::Common::Info

  include ::TokyoMetro::Factory::Seed::Reference::RailwayLine
  include ::TokyoMetro::Factory::Seed::Reference::RailwayDirection

  private

  def hash_to_db
    _railway_line_id = railway_line_id
    {
      station_facility_info_id: @station_facility_info_id ,
      railway_line_id: _railway_line_id ,
      railway_direction_id: railway_direction_id( _railway_line_id ) ,
      car_composition: @info.car_composition ,
      car_number: @info.car_number
    }
  end

  def method_name_for_db_instance_class
    :db_instance_class_of_platform_info
  end

  def seed_optional_infos
    [ :transfer_infos , :barrier_free_facilities , :surrounding_areas ].each do | method_base_name |
      @info.send( "seed_#{ method_base_name }" , @id )
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/factory/seed/api/station_facility/info/platform/info.rb