Class: ElasticGraph::SchemaArtifacts::RuntimeMetadata::ComputationDetail
- Inherits:
-
Object
- Object
- ElasticGraph::SchemaArtifacts::RuntimeMetadata::ComputationDetail
- Defined in:
- lib/elastic_graph/schema_artifacts/runtime_metadata/computation_detail.rb
Overview
Details about our aggregation functions.
Constant Summary collapse
- FUNCTION =
"function"- EMPTY_BUCKET_VALUE =
"empty_bucket_value"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_hash(hash) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/computation_detail.rb', line 19 def self.from_hash(hash) new( empty_bucket_value: hash[EMPTY_BUCKET_VALUE], function: hash.fetch(FUNCTION).to_sym ) end |
Instance Method Details
#to_dumpable_hash ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/computation_detail.rb', line 26 def to_dumpable_hash { # Keys here are ordered alphabetically; please keep them that way. EMPTY_BUCKET_VALUE => empty_bucket_value, FUNCTION => function.to_s } end |