Class: JsonDataExtractor::SchemaAnalyzer
- Defined in:
- lib/json_data_extractor/schema_analyzer.rb
Overview
Analyzes schema and creates optimized extraction plan
Instance Attribute Summary collapse
-
#extraction_plan ⇒ Object
readonly
Returns the value of attribute extraction_plan.
-
#result_template ⇒ Object
readonly
Returns the value of attribute result_template.
Instance Method Summary collapse
-
#initialize(schema, modifiers = {}) ⇒ SchemaAnalyzer
constructor
A new instance of SchemaAnalyzer.
Constructor Details
#initialize(schema, modifiers = {}) ⇒ SchemaAnalyzer
Returns a new instance of SchemaAnalyzer.
9 10 11 12 13 14 15 16 17 |
# File 'lib/json_data_extractor/schema_analyzer.rb', line 9 def initialize(schema, modifiers = {}) @schema = schema @modifiers = modifiers @path_compiler = PathCompiler.new @extraction_plan = [] @result_template = {} analyze_schema end |
Instance Attribute Details
#extraction_plan ⇒ Object (readonly)
Returns the value of attribute extraction_plan.
7 8 9 |
# File 'lib/json_data_extractor/schema_analyzer.rb', line 7 def extraction_plan @extraction_plan end |
#result_template ⇒ Object (readonly)
Returns the value of attribute result_template.
7 8 9 |
# File 'lib/json_data_extractor/schema_analyzer.rb', line 7 def result_template @result_template end |