Class: ElasticGraph::SchemaArtifacts::RuntimeMetadata::StaticParam

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_graph/schema_artifacts/runtime_metadata/params.rb

Constant Summary collapse

VALUE =
"value"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



64
65
66
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/params.rb', line 64

def self.from_hash(hash)
  new(value: hash.fetch(VALUE))
end

Instance Method Details

#to_dumpable_hash(param_name) ⇒ Object



68
69
70
71
72
73
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/params.rb', line 68

def to_dumpable_hash(param_name)
  {
    # Keys here are ordered alphabetically; please keep them that way.
    VALUE => value
  }
end

#value_for(event_or_prepared_record) ⇒ Object



75
76
77
# File 'lib/elastic_graph/schema_artifacts/runtime_metadata/params.rb', line 75

def value_for(event_or_prepared_record)
  value
end