class Orchestrate::Application::Metadata
Holds the metadata associated with each document in the results from a GET request.
Public Class Methods
new(metadata)
click to toggle source
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)
# File rails/lib/orchestrate_application/document.rb, line 58 def initialize(metadata) metadata.each do |k,v| self.class.send :attr_reader, k.to_s instance_variable_set "@#{k.to_s}", v end end