Sha256: e5ef53aaf599ff8b9b87abb4a98d9601c20026304956103580bc7c5dc4c2693b
Contents?: true
Size: 335 Bytes
Versions: 3
Compression:
Stored size: 335 Bytes
Contents
module Spotlight::Resources class Searchworks < Spotlight::Resources::DorResource self.weight = -1000 def self.can_provide? res !!(res.url =~ /^https?:\/\/searchworks[^\.]*.stanford.edu/) end def doc_id url.match(/^https?:\/\/searchworks[^\.]*.stanford.edu\/.*view\/([^\/\.#]+)/)[1] end end end
Version data entries
3 entries across 3 versions & 1 rubygems