class GeoCombine::GeoBlacklightHarvester::BlacklightResponseVersionFactory
A “factory” class to determine the blacklight response version to use
Public Class Methods
call(json)
click to toggle source
# File lib/geo_combine/geo_blacklight_harvester.rb, line 73 def self.call(json) keys = json.keys if keys.include?('response') LegacyBlacklightResponse elsif keys.any? && %w[links data].all? { |param| keys.include?(param) } ModernBlacklightResponse else raise NotImplementedError, "The following json response was not able to be parsed by the GeoBlacklightHarvester\n#{json}" end end