Class: Mxrb::Compiler::CompatibilityAnalyzer

Inherits:
Object
  • Object
show all
Includes:
ModelValues
Defined in:
lib/mxrb/compiler/compatibility_analyzer.rb

Overview

Read-only preflight for features consumed by the native compiler and web runtime. rubocop:disable Metrics

Instance Method Summary collapse

Constructor Details

#initialize(path, source: nil) ⇒ CompatibilityAnalyzer

Returns a new instance of CompatibilityAnalyzer.



27
28
29
30
31
# File 'lib/mxrb/compiler/compatibility_analyzer.rb', line 27

def initialize(path, source: nil)
  @path = File.expand_path(path)
  @source = source || SourceModel.read(@path)
  @findings = []
end

Instance Method Details

#analyzeObject



33
34
35
36
37
38
39
40
# File 'lib/mxrb/compiler/compatibility_analyzer.rb', line 33

def analyze
  analyze_version
  analyze_features if @adapter
  CompatibilityReport.new(
    path: @path, mendix_version: @source.version, findings: collapsed_findings.freeze,
    stats: statistics.freeze
  )
end