Class: ElasticGraph::SchemaArtifacts::RuntimeMetadata::IndexDefinition::Rollover
- Inherits:
-
Object
- Object
- ElasticGraph::SchemaArtifacts::RuntimeMetadata::IndexDefinition::Rollover
- Defined in:
- lib/elastic_graph/schema_artifacts/runtime_metadata/index_definition.rb
Constant Summary collapse
- FREQUENCY =
"frequency"- TIMESTAMP_FIELD_PATH =
"timestamp_field_path"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_hash(hash) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/index_definition.rb', line 60 def self.from_hash(hash) new( frequency: hash.fetch(FREQUENCY).to_sym, timestamp_field_path: hash[TIMESTAMP_FIELD_PATH] ) end |
Instance Method Details
#to_dumpable_hash ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/index_definition.rb', line 67 def to_dumpable_hash { # Keys here are ordered alphabetically; please keep them that way. FREQUENCY => frequency.to_s, TIMESTAMP_FIELD_PATH => } end |