Sha256: 7757b9b5728ad747153f146ba686fb8318916f023149f3841d0a582e3f7623f4
Contents?: true
Size: 664 Bytes
Versions: 12
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true module Geoblacklight module Relation class RelationResponse attr_reader :search_id, :link_id def initialize(id, repository) @link_id = id @search_id = RSolr.solr_escape(id) @repository = repository end def ancestors @ancestors ||= Geoblacklight::Relation::Ancestors.new(@search_id, @repository).results end def descendants @descendants ||= Geoblacklight::Relation::Descendants.new(@search_id, @repository).results end def empty? !(ancestors['numFound'].positive? || descendants['numFound'].positive?) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems