Class: DomGlancy::Analyzer
- Inherits:
-
Object
- Object
- DomGlancy::Analyzer
- Defined in:
- lib/dom_glancy/analyzer.rb
Instance Attribute Summary collapse
-
#changed_element_pairs ⇒ Object
readonly
Returns the value of attribute changed_element_pairs.
-
#set_changed_master ⇒ Object
readonly
Returns the value of attribute set_changed_master.
-
#set_current_not_master ⇒ Object
readonly
Returns the value of attribute set_current_not_master.
-
#set_master_not_current ⇒ Object
readonly
Returns the value of attribute set_master_not_current.
Instance Method Summary collapse
- #analyze ⇒ Object
-
#initialize(master_data, current_data, test_root = nil) ⇒ Analyzer
constructor
A new instance of Analyzer.
Constructor Details
#initialize(master_data, current_data, test_root = nil) ⇒ Analyzer
Returns a new instance of Analyzer.
12 13 14 15 16 |
# File 'lib/dom_glancy/analyzer.rb', line 12 def initialize(master_data, current_data, test_root = nil) @master_data = master_data @current_data = current_data @test_root = test_root end |
Instance Attribute Details
#changed_element_pairs ⇒ Object (readonly)
Returns the value of attribute changed_element_pairs.
6 7 8 |
# File 'lib/dom_glancy/analyzer.rb', line 6 def changed_element_pairs @changed_element_pairs end |
#set_changed_master ⇒ Object (readonly)
Returns the value of attribute set_changed_master.
5 6 7 |
# File 'lib/dom_glancy/analyzer.rb', line 5 def set_changed_master @set_changed_master end |
#set_current_not_master ⇒ Object (readonly)
Returns the value of attribute set_current_not_master.
3 4 5 |
# File 'lib/dom_glancy/analyzer.rb', line 3 def set_current_not_master @set_current_not_master end |
#set_master_not_current ⇒ Object (readonly)
Returns the value of attribute set_master_not_current.
4 5 6 |
# File 'lib/dom_glancy/analyzer.rb', line 4 def set_master_not_current @set_master_not_current end |
Instance Method Details
#analyze ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dom_glancy/analyzer.rb', line 18 def analyze clear_results if missing_elements? || extra_elements? remove_similar_elements extract_changed_elements end # create_diff_file if @test_root && !all_same? compile_results end |