Class: DomGlancy::AnalysisReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/dom_glancy/analysis_reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(test_root, set_current_not_master, set_master_not_current, set_changed_master, changed_pairs) ⇒ AnalysisReporter

Returns a new instance of AnalysisReporter.



9
10
11
12
13
14
15
# File 'lib/dom_glancy/analysis_reporter.rb', line 9

def initialize(test_root, set_current_not_master,set_master_not_current, set_changed_master, changed_pairs)
  @test_root              = test_root
  @set_current_not_master = set_current_not_master
  @set_master_not_current = set_master_not_current
  @set_changed_master     = set_changed_master
  @changed_pairs          = changed_pairs
end

Instance Method Details

#create_diff_fileObject



17
18
19
20
21
22
23
24
25
# File 'lib/dom_glancy/analysis_reporter.rb', line 17

def create_diff_file
  filename = ::DomGlancy::FileNameBuilder.new(@test_root).diff
  svg = make_svg
  File.open(filename, 'w') { |file| file.write(svg) }
  save_set_info('current_not_master', @set_current_not_master)
  save_set_info('master_not_current', @set_master_not_current)
  save_set_info('changed_master',     @set_changed_master)
  save_set_info('changed_pairs',      @changed_pairs)
end