Class: Continuum::TestResult
- Inherits:
-
Object
- Object
- Continuum::TestResult
- Defined in:
- src/lib/continuum/test_result.rb
Overview
Encapsulates all of the data related to assertions returned from Access Engine
Instance Attribute Summary collapse
-
#att_no ⇒ Integer
Gets the number of attributes for the element associated with this test result.
-
#clustering_data ⇒ ClusteringData
Gets the clustering data for the element associated with this test result.
-
#css ⇒ String
Gets the CSS selector for the element associated with this test result.
-
#element ⇒ String
Gets the HTML for the element associated with this test result.
-
#encoding ⇒ Array<Integer>
Gets the character encoding array for the element associated with this test result.
-
#timestamp ⇒ String
Gets the timestamp at which the test result was recorded.
-
#uel ⇒ String
Gets the UEL for the element associated with this test result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(att_no, css, uel, encoding, element, timestamp, clustering_data) ⇒ TestResult
constructor
A new instance of TestResult.
Constructor Details
#initialize(att_no, css, uel, encoding, element, timestamp, clustering_data) ⇒ TestResult
Returns a new instance of TestResult.
54 55 56 57 58 59 60 61 62 |
# File 'src/lib/continuum/test_result.rb', line 54 def initialize(att_no, css, uel, encoding, element, , clustering_data) @att_no = att_no @css = css @uel = uel @encoding = encoding @element = element @timestamp = @clustering_data = clustering_data end |
Instance Attribute Details
#att_no ⇒ Integer
Gets the number of attributes for the element associated with this test result.
15 16 17 |
# File 'src/lib/continuum/test_result.rb', line 15 def att_no @att_no end |
#clustering_data ⇒ ClusteringData
Gets the clustering data for the element associated with this test result.
45 46 47 |
# File 'src/lib/continuum/test_result.rb', line 45 def clustering_data @clustering_data end |
#css ⇒ String
Gets the CSS selector for the element associated with this test result.
20 21 22 |
# File 'src/lib/continuum/test_result.rb', line 20 def css @css end |
#element ⇒ String
Gets the HTML for the element associated with this test result.
35 36 37 |
# File 'src/lib/continuum/test_result.rb', line 35 def element @element end |
#encoding ⇒ Array<Integer>
Gets the character encoding array for the element associated with this test result.
30 31 32 |
# File 'src/lib/continuum/test_result.rb', line 30 def encoding @encoding end |
#timestamp ⇒ String
Gets the timestamp at which the test result was recorded.
40 41 42 |
# File 'src/lib/continuum/test_result.rb', line 40 def @timestamp end |
#uel ⇒ String
Gets the UEL for the element associated with this test result.
25 26 27 |
# File 'src/lib/continuum/test_result.rb', line 25 def uel @uel end |
Class Method Details
.from_json(json_data) ⇒ AccessibilityConcern
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'src/lib/continuum/test_result.rb', line 66 def self.from_json(json_data) parsed = DataUtil.parse_json(json_data) || {} return new( parsed['attrNo'], parsed['css'], parsed['uel'], parsed['encoding'], parsed['element'], parsed['timestamp'], ClusteringData.from_json(parsed['clusteringData']) ) end |