Class: TokyoMetro::Factory::Save::Api::TrainLocation::Group
- Inherits:
-
MetaClass::Group
- Object
- MetaClass::Group
- TokyoMetro::Factory::Save::Api::TrainLocation::Group
- Includes:
- ClassNameLibrary::Api::TrainLocation
- Defined in:
- lib/tokyo_metro/factory/save/api/train_location/group.rb
Overview
列車位置情報 odpt.Train のデータを保存するためのクラス
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from MetaClass::Group
Instance Method Summary collapse
- #get_and_set_data(http_client) ⇒ Object
-
#initialize(railway_line, db_dir, file_type, generate_instance, to_inspect) ⇒ Group
constructor
Constructor.
Methods inherited from MetaClass::Group
file_info_class_for_saving, #instance_will_be_generated?, key_name_for_determining_dir_when_saving_grouped_infos_and_instance_is_not_generated, list_class_for_saving_grouped_infos, method_name_for_determining_dir_when_saving_grouped_infos_and_instance_is_generated, process, settings_for_dirname_and_filename, #to_data_list
Constructor Details
#initialize(railway_line, db_dir, file_type, generate_instance, to_inspect) ⇒ Group
Constructor
7 8 9 10 |
# File 'lib/tokyo_metro/factory/save/api/train_location/group.rb', line 7 def initialize( railway_line , db_dir , file_type , generate_instance , to_inspect ) @railway_line = railway_line super( db_dir , file_type , generate_instance , to_inspect ) end |
Instance Method Details
#get_and_set_data(http_client) ⇒ Object
12 13 14 15 16 |
# File 'lib/tokyo_metro/factory/save/api/train_location/group.rb', line 12 def get_and_set_data( http_client ) ary = self.class.toplevel_namespace.get( http_client , @railway_line , parse_json: true , generate_instance: @generate_instance , to_inspect: @to_inspect ) raise "Error" unless ary.kind_of?( ::Array ) @data = ary end |