class TokyoMetro::Factory::Get::Api::MetaClass::Search::DataSearch

API からデータを取得するための Factory Pattern のクラス(データ検索 API を利用する場合)

Private Class Methods

rdf_type() click to toggle source
# File lib/tokyo_metro/factory/get/api/meta_class/search/data_search.rb, line 21
def self.rdf_type
  self.info_class.rdf_type
end

Private Instance Methods

access_point_url() click to toggle source
# File lib/tokyo_metro/factory/get/api/meta_class/search/data_search.rb, line 25
def access_point_url
  ::TokyoMetro::DATAPOINTS_URL
end
set_parameter_send_to_api( h , key , value , *class_type ) click to toggle source

HTTP クライアントに渡すパラメーターを設定するメソッド (private) @param h [Hash] パラメーターのハッシュ @param key [String] パラメーターのハッシュに設定するキー @param value [Object] パラメーターのハッシュに設定するキーに対応する値 @param class_type [::Array <Const>] value のクラス @return [nil]

# File lib/tokyo_metro/factory/get/api/meta_class/search/data_search.rb, line 12
def set_parameter_send_to_api( h , key , value , *class_type )
  if ( class_type.include?( Integer ) and value.integer? ) or class_type.include?( value.class )
    h[ key ] = value.to_s
  elsif value.present?
    raise "Error"
  end
  return nil
end