Sha256: 9977614f79ade1e8ed8156bf7202ee8dd4d0eec0545b5a7edc1b01928bc086e9
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
# API から取得したハッシュからインスタンスを生成するための Factory Pattern のクラス(メタクラス) class TokyoMetro::Factory::Generate::Api::MlitRailwayLine::Info < TokyoMetro::Factory::Generate::Api::MetaClass::Info::Fundamental include ::TokyoMetro::ClassNameLibrary::Api::MlitRailwayLine # Info クラスに送る変数のリスト # @return [::Array] def variables id = @hash[ "\@id" ] geo_long = @hash[ "geo:long" ] geo_lat = @hash[ "geo:lat" ] region = @hash[ "ug:region" ] [ id , geo_long , geo_lat , region , variables_of_mlit_datas ].flatten end private def variables_of_mlit_datas mlit_operator_name = @hash[ "mlit:operatorName" ] mlit_railway_line_name = @hash[ "mlit:railwayName" ] [ mlit_operator_name , mlit_railway_line_name ] 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/mlit_railway_line/info.rb |