Class: Ea::Svg::Parity::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/ea/svg/parity/suite.rb

Overview

Drives Parity::Checker across every diagram in a Document that has a matching reference SVG. Drives from any source the Document supports (qea or xmi) since the Document is format-agnostic.

Defined Under Namespace

Classes: DiagramReport, Report

Constant Summary collapse

ELEMENT_TYPES =
%i[rect polygon path text].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document, ref_dir) ⇒ Suite

Returns a new instance of Suite.



18
19
20
21
# File 'lib/ea/svg/parity/suite.rb', line 18

def initialize(document, ref_dir)
  @document = document
  @ref_dir = ref_dir
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



16
17
18
# File 'lib/ea/svg/parity/suite.rb', line 16

def document
  @document
end

#ref_dirObject (readonly)

Returns the value of attribute ref_dir.



16
17
18
# File 'lib/ea/svg/parity/suite.rb', line 16

def ref_dir
  @ref_dir
end

Instance Method Details

#measureObject



23
24
25
26
# File 'lib/ea/svg/parity/suite.rb', line 23

def measure
  per_diagram = diagrams_with_references.map { |d| measure_one(d) }
  Report.new(per_diagram: per_diagram)
end