Class: TokyoMetro::Factory::Generate::Api::Station::Info
- Inherits:
-
MetaClass::Info::Fundamental
- Object
- MetaClass::Info::Fundamental
- TokyoMetro::Factory::Generate::Api::Station::Info
- Defined in:
- lib/tokyo_metro/factory/generate/api/station/info.rb
Overview
API から取得したハッシュからインスタンスを生成するための Factory Pattern のクラス(メタクラス)
Defined Under Namespace
Modules: Common, ConnectingRailwayLine, Exit, LinkToPassengerSurvey
Instance Method Summary collapse
-
#variables ⇒ ::Array
Info クラスに送る変数のリスト.
Methods inherited from MetaClass::Info::Fundamental
#generate, #initialize, instance_class, process, #to_check_validity?
Constructor Details
This class inherits a constructor from TokyoMetro::Factory::Generate::Api::MetaClass::Info::Fundamental
Instance Method Details
#variables ⇒ ::Array
Info クラスに送る変数のリスト
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tokyo_metro/factory/generate/api/station/info.rb', line 9 def variables id = @hash[ "\@id" ] same_as = @hash[ "owl:sameAs" ] title = @hash[ "dc:title" ] dc_date = DateTime.parse( @hash[ "dc:date" ] ) geo_long = @hash[ "geo:long" ] geo_lat = @hash[ "geo:lat" ] region = @hash[ "ug:region" ] operator = @hash[ "odpt:operator" ] railway_line = @hash[ "odpt:railway" ] facility = @hash[ "odpt:facility" ] station_code = @hash[ "odpt:stationCode" ] [ id , same_as , title , dc_date , geo_long , geo_lat , region , operator , railway_line , connecting_railway_lines , facility , link_to_passenger_survey , station_code , exit_list ] end |