Sha256: f974d30d95ca1e3acc10b8aa85b75b9f7ec05fcbe24a8537a9a1e459a937fb1b

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

# API から取得したハッシュからインスタンスを生成するための Factory Pattern のクラス(メタクラス)
class TokyoMetro::Factory::Generate::Api::StationFacility::Info::Platform::Info < TokyoMetro::Factory::Generate::Api::MetaClass::Info::NotOnTheTopLayer

  include ::TokyoMetro::ClassNameLibrary::Api::StationFacility
  include ::TokyoMetro::Factory::Generate::Api::MetaClass::Info::ConvertAndSetArrayData::ModuleForMethod

  def variables
    ary_1 = [ "odpt:railway" , "odpt:carComposition" , "odpt:carNumber" , "odpt:railDirection" ].map { | key | @hash[ key ] }
    ary_2 = [ transfer_info , barrier_free , surrounding_area ]

    ary_1 + ary_2
  end

  def self.instance_class
    platform_info_class
  end

  private

  def transfer_info
    covert_and_set_array_data( "odpt:transferInformation" , self.class.platform_transfer_list_class , self.class.platform_transfer_info_class )
  end

  def barrier_free
    covert_and_set_array_data( "odpt:barrierfreeFacility" , self.class.platform_barrier_free_list_class , self.class.platform_barrier_free_info_class )
  end

  def surrounding_area
    covert_and_set_array_data( "odpt:surroundingArea" , self.class.platform_surrounding_area_list_class , self.class.platform_surrounding_area_info_class )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

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