Class: R2OAS::Schema::V3::BaseAnalyzer

Inherits:
Base show all
Includes:
R2OAS::Sortable
Defined in:
lib/r2-oas/schema/v3/analyzer/base_analyzer.rb

Constant Summary

Constants inherited from Base

R2OAS::Schema::V3::Base::SUPPORT_COMPONENTS_OBJECTS

Instance Method Summary collapse

Methods included from R2OAS::Sortable

#deep_sort

Methods inherited from Base

#support_components_objects

Constructor Details

#initialize(before_schema_data, after_schema_data, options = {}) ⇒ BaseAnalyzer

Returns a new instance of BaseAnalyzer.



12
13
14
15
16
17
# File 'lib/r2-oas/schema/v3/analyzer/base_analyzer.rb', line 12

def initialize(before_schema_data, after_schema_data, options = {})
  super(options)
  @type = options[:type].presence
  @before_schema_data = before_schema_data
  @after_schema_data  = after_schema_data.presence || create_after_schema_data
end

Instance Method Details

#analyze_docsObject

Raises:



19
20
21
# File 'lib/r2-oas/schema/v3/analyzer/base_analyzer.rb', line 19

def analyze_docs
  raise NoImplementError, 'Please implement in inherited class.'
end

#generate_from_existing_schemaObject

Raises:



23
24
25
# File 'lib/r2-oas/schema/v3/analyzer/base_analyzer.rb', line 23

def generate_from_existing_schema
  raise NoImplementError, 'Please implement in inherited class.'
end