Class: GeneValidator::ValidationReport
- Inherits:
-
Object
- Object
- GeneValidator::ValidationReport
- Defined in:
- lib/genevalidator/validation_report.rb
Overview
This is an abstract class extended by all validation reports
Direct Known Subclasses
AlignmentValidationOutput, BlastRFValidationOutput, DuplicationValidationOutput, GeneMergeValidationOutput, LengthClusterValidationOutput, LengthRankValidationOutput, ORFValidationOutput
Instance Attribute Summary collapse
-
#approach ⇒ Object
Returns the value of attribute approach.
-
#bg_color ⇒ Object
readonly
Returns the value of attribute bg_color.
-
#conclusion ⇒ Object
Returns the value of attribute conclusion.
-
#description ⇒ Object
Returns the value of attribute description.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#explanation ⇒ Object
Returns the value of attribute explanation.
-
#header ⇒ Object
Returns the value of attribute header.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#plot_files ⇒ Object
readonly
Returns the value of attribute plot_files.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#running_time ⇒ Object
Returns the value of attribute running_time.
-
#short_header ⇒ Object
Returns the value of attribute short_header.
-
#validation_result ⇒ Object
readonly
Returns the value of attribute validation_result.
Instance Method Summary collapse
-
#color ⇒ Object
May return “success” or “error”.
-
#initialize(message = 'Not enough evidence', validation_result = :no, short_header = '', header = '', description = '', approach = '', explanation = '', conclusion = '') ⇒ ValidationReport
constructor
Initilizes the object Params:
message: result of the validation (to be displayed in the output)validation_result: :yes for pass validation, :no for fail, :unapplicable or :errorshort_header: Stringheader: Stringdescription: Stringbg_color: background color of the table cell for the html output (nil by default). - #print ⇒ Object
- #validation ⇒ Object
Constructor Details
#initialize(message = 'Not enough evidence', validation_result = :no, short_header = '', header = '', description = '', approach = '', explanation = '', conclusion = '') ⇒ ValidationReport
Initilizes the object Params: message: result of the validation (to be displayed in the output) validation_result: :yes for pass validation, :no for fail, :unapplicable or :error short_header: String header: String description: String bg_color: background color of the table cell for the html output (nil by default)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/genevalidator/validation_report.rb', line 36 def initialize( = 'Not enough evidence', validation_result = :no, short_header = '', header = '', description = '', approach = '', explanation = '', conclusion = '') @message = @errors = [] @result = validation_result @expected = :yes @validation_result = validation_result @short_header = short_header @header = header @description = description @approach = approach @explanation = explanation @conclusion = conclusion end |
Instance Attribute Details
#approach ⇒ Object
Returns the value of attribute approach.
21 22 23 |
# File 'lib/genevalidator/validation_report.rb', line 21 def approach @approach end |
#bg_color ⇒ Object (readonly)
Returns the value of attribute bg_color.
11 12 13 |
# File 'lib/genevalidator/validation_report.rb', line 11 def bg_color @bg_color end |
#conclusion ⇒ Object
Returns the value of attribute conclusion.
23 24 25 |
# File 'lib/genevalidator/validation_report.rb', line 23 def conclusion @conclusion end |
#description ⇒ Object
Returns the value of attribute description.
19 20 21 |
# File 'lib/genevalidator/validation_report.rb', line 19 def description @description end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
16 17 18 |
# File 'lib/genevalidator/validation_report.rb', line 16 def errors @errors end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
14 15 16 |
# File 'lib/genevalidator/validation_report.rb', line 14 def expected @expected end |
#explanation ⇒ Object
Returns the value of attribute explanation.
22 23 24 |
# File 'lib/genevalidator/validation_report.rb', line 22 def explanation @explanation end |
#header ⇒ Object
Returns the value of attribute header.
18 19 20 |
# File 'lib/genevalidator/validation_report.rb', line 18 def header @header end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
10 11 12 |
# File 'lib/genevalidator/validation_report.rb', line 10 def @message end |
#plot_files ⇒ Object (readonly)
Returns the value of attribute plot_files.
12 13 14 |
# File 'lib/genevalidator/validation_report.rb', line 12 def plot_files @plot_files end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
13 14 15 |
# File 'lib/genevalidator/validation_report.rb', line 13 def result @result end |
#running_time ⇒ Object
Returns the value of attribute running_time.
20 21 22 |
# File 'lib/genevalidator/validation_report.rb', line 20 def running_time @running_time end |
#short_header ⇒ Object
Returns the value of attribute short_header.
17 18 19 |
# File 'lib/genevalidator/validation_report.rb', line 17 def short_header @short_header end |
#validation_result ⇒ Object (readonly)
Returns the value of attribute validation_result.
15 16 17 |
# File 'lib/genevalidator/validation_report.rb', line 15 def validation_result @validation_result end |
Instance Method Details
#color ⇒ Object
May return “success” or “error”
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/genevalidator/validation_report.rb', line 62 def color bg_color unless bg_color.nil? if validation == @expected 'success' elsif validation == :error || validation == :unapplicable 'warning' else (validation == :warning) ? 'warning' : 'danger' end end |
#print ⇒ Object
52 53 54 |
# File 'lib/genevalidator/validation_report.rb', line 52 def print end |
#validation ⇒ Object
56 57 58 |
# File 'lib/genevalidator/validation_report.rb', line 56 def validation validation_result end |