Class: TokyoMetro::Factory::Generate::Api::StationTimetable::Info
- Inherits:
-
MetaClass::Info::Fundamental
- Object
- MetaClass::Info::Fundamental
- TokyoMetro::Factory::Generate::Api::StationTimetable::Info
- Includes:
- ClassNameLibrary::Api::StationTimetable
- Defined in:
- lib/tokyo_metro/factory/generate/api/station_timetable/info.rb
Overview
API から取得したハッシュからインスタンスを生成するための Factory Pattern のクラス(メタクラス)
Defined Under Namespace
Modules: Fundamental, TrainTime
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 クラスに送る変数のリスト
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tokyo_metro/factory/generate/api/station_timetable/info.rb', line 8 def variables id = @hash[ "\@id" ] same_as = @hash[ "owl:sameAs" ] dc_date = @hash[ "dc:date" ] # station = @hash[ "odpt:station" ] # railway_line = @hash[ "odpt:railway" ] # operator = @hash[ "odpt:operator" ] # railway_direction = @hash[ "odpt:railDirection" ] fundamental_infos = station_fundamental_infos weekdays = ( "odpt:weekdays" ) saturdays = ( "odpt:saturdays" ) holidays = ( "odpt:holidays" ) # [ id , same_as , dc_date , station , railway_line , operator , railway_direction , # weekdays , saturdays , holidays ] [ id , same_as , dc_date , fundamental_infos , weekdays , saturdays , holidays ] end |