Module: ElasticGraph::JSONIngestion::SchemaDefinition::FactoryExtension Private

Defined in:
elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/factory_extension.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Extension module applied to ElasticGraph::SchemaDefinition::Factory to wire up JSON Schema support on Results and SchemaArtifactManager instances.

Instance Method Summary collapse

Instance Method Details

#new_resultsElasticGraph::SchemaDefinition::Results

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a new Results instance with JSON Schema extensions.

Returns:



94
95
96
97
98
# File 'elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/factory_extension.rb', line 94

def new_results
  super.tap do |results|
    results.extend(ResultsExtension)
  end
end

#new_schema_artifact_managerElasticGraph::SchemaDefinition::SchemaArtifactManager

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a new SchemaArtifactManager instance with JSON Schema extensions.

Returns:

  • (ElasticGraph::SchemaDefinition::SchemaArtifactManager)

    the created artifact manager



103
104
105
106
107
# File 'elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/factory_extension.rb', line 103

def new_schema_artifact_manager(...)
  super.tap do |manager|
    manager.extend(SchemaArtifactManagerExtension)
  end
end