class TokyoMetro::Factory::Generate::Api::StationFacility::Info::BarrierFree::Info
API から取得したハッシュからインスタンスを生成するための Factory Pattern のクラス(メタクラス)
Public Instance Methods
variables()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 9 def variables id = @hash[ "\@id" ] same_as = @hash[ "owl:sameAs" ] place_name = @hash[ "odpt:placeName" ] located_area_name = @hash[ "odpt:locatedAreaName" ] remark = @hash[ "ugsrv:remark" ] unless located_area_name.string? and /\A改札(?:内|外)\Z/ === located_area_name located_area_name = "☆☆☆☆☆☆☆☆" end [ id , same_as , service_details , place_name , located_area_name , remark ] end
Private Instance Methods
check_validity(h)
click to toggle source
Calls superclass method
TokyoMetro::Factory::Generate::Api::MetaClass::Info::Fundamental#check_validity
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 30 def check_validity(h) super( h , barrier_free: true ) end
service_details()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 51 def service_details covert_and_set_array_data( "odpt:serviceDetail" , self.class.barrier_free_service_detail_list_class , self.class.barrier_free_service_detail_info_class ) end
to_check_validity?()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 26 def to_check_validity? true end
variables__check()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 34 def variables__check puts variables__check__separation * 32 puts "#{variables__check__letter} called: #{ self.class.name }\#variables" puts " " * 3 + "service detail class:" puts " " * 5 + "#{self.class.name}.barrier_free_service_detail_info_class" puts " " * 7 + "= #{ self.class.barrier_free_service_detail_info_class.name }" puts "" end
variables__check__letter()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 47 def variables__check__letter "○" end
variables__check__separation()
click to toggle source
# File lib/tokyo_metro/factory/generate/api/station_facility/info/barrier_free/info.rb, line 43 def variables__check__separation "-" end