Sha256: f19fc172b81809451639b66b866d270d41f6bd7aa75f929763fc3720186f9e75

Contents?: true

Size: 421 Bytes

Versions: 25

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true
class SolrHit < Delegator
  def __getobj__
    @document # return object we are delegating to, required
  end

  alias static_config __getobj__

  def __setobj__(obj)
    @document = obj
  end

  attr_reader :document

  def initialize(document)
    document = document.with_indifferent_access
    super
    @document = document
  end

  def id
    document[Hyrax.config.id_field]
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/models/solr_hit.rb
hyrax-5.0.0 app/models/solr_hit.rb
hyrax-5.0.0.rc3 app/models/solr_hit.rb
hyrax-5.0.0.rc2 app/models/solr_hit.rb
hyrax-5.0.0.rc1 app/models/solr_hit.rb
hyrax-3.6.0 app/models/solr_hit.rb
hyrax-4.0.0 app/models/solr_hit.rb
hyrax-4.0.0.rc3 app/models/solr_hit.rb
hyrax-4.0.0.rc2 app/models/solr_hit.rb
hyrax-4.0.0.rc1 app/models/solr_hit.rb
hyrax-3.5.0 app/models/solr_hit.rb
hyrax-4.0.0.beta2 app/models/solr_hit.rb
hyrax-3.4.2 app/models/solr_hit.rb
hyrax-4.0.0.beta1 app/models/solr_hit.rb
hyrax-3.4.1 app/models/solr_hit.rb
hyrax-3.4.0 app/models/solr_hit.rb
hyrax-3.3.0 app/models/solr_hit.rb
hyrax-3.2.0 app/models/solr_hit.rb
hyrax-3.1.0 app/models/solr_hit.rb
hyrax-3.0.2 app/models/solr_hit.rb