Class: Orchestrate::Application::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/orchestrate_application/document.rb

Overview

Holds the metadata associated with each document in the results from a GET request.

Instance Method Summary collapse

Constructor Details

#initialize(metadata) ⇒ Metadata

For all documents, the metadata includes:

  • collection

  • key

  • ref

and the following for specific result types:

  • score (search)

  • etype (events)

  • kind, from_collection and from_key (graph)



58
59
60
61
62
63
# File 'lib/orchestrate_application/document.rb', line 58

def initialize()
  .each do |k,v|
    self.class.send :attr_reader, k.to_s
    instance_variable_set "@#{k.to_s}", v
  end
end