Sha256: 76a3e16131cb188d4274872bc02767b21a4d1f0f55839fff0c7155393d415c38

Contents?: true

Size: 251 Bytes

Versions: 77

Compression:

Stored size: 251 Bytes

Contents

class SolrDocument
  def initialize(source_doc={}, solr_response=nil)
    @source_doc = source_doc
  end

  def id
    fetch(:id)
  end

  def fetch(field, default = nil)
    @source_doc[field]
  end

  def [](field)
    @source_doc[field]
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
hydra-access-controls-13.0.0 spec/support/solr_document.rb
hydra-access-controls-12.1.0 spec/support/solr_document.rb
hydra-access-controls-12.0.2 spec/support/solr_document.rb
hydra-access-controls-11.0.7 spec/support/solr_document.rb
hydra-access-controls-12.0.1 spec/support/solr_document.rb
hydra-access-controls-11.0.6 spec/support/solr_document.rb
hydra-access-controls-12.0.0 spec/support/solr_document.rb
hydra-access-controls-11.0.1 spec/support/solr_document.rb
hydra-access-controls-11.0.0 spec/support/solr_document.rb
hydra-access-controls-11.0.0.rc2 spec/support/solr_document.rb
hydra-access-controls-10.7.0 spec/support/solr_document.rb
hydra-access-controls-10.6.2 spec/support/solr_document.rb
hydra-access-controls-10.6.1 spec/support/solr_document.rb
hydra-access-controls-10.6.0 spec/support/solr_document.rb
hydra-access-controls-10.5.1 spec/support/solr_document.rb
hydra-access-controls-11.0.0.rc1 spec/support/solr_document.rb
hydra-access-controls-10.5.0 spec/support/solr_document.rb
hydra-access-controls-8.2.0 spec/support/solr_document.rb
hydra-access-controls-10.4.0 spec/support/solr_document.rb
hydra-access-controls-10.4.0.rc2 spec/support/solr_document.rb