Class: ElasticGraph::SchemaArtifacts::RuntimeMetadata::IndexField
- Inherits:
-
Object
- Object
- ElasticGraph::SchemaArtifacts::RuntimeMetadata::IndexField
- Defined in:
- lib/elastic_graph/schema_artifacts/runtime_metadata/index_field.rb
Overview
Runtime metadata related to a field on a datastore index definition.
Constant Summary collapse
- SOURCE =
"source"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_hash(hash) ⇒ Object
20 21 22 23 24 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/index_field.rb', line 20 def self.from_hash(hash) new( source: hash[SOURCE] || SELF_RELATIONSHIP_NAME ) end |
Instance Method Details
#to_dumpable_hash ⇒ Object
26 27 28 29 30 31 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/index_field.rb', line 26 def to_dumpable_hash { # Keys here are ordered alphabetically; please keep them that way. SOURCE => source } end |