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, MakerQIValidationOutput, ORFValidationOutput
Instance Attribute Summary collapse
-
#approach ⇒ Object
Returns the value of attribute approach.
-
#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.
-
#run_time ⇒ Object
Returns the value of attribute run_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
: String 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 by default)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/genevalidator/validation_report.rb', line 34 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.
20 21 22 |
# File 'lib/genevalidator/validation_report.rb', line 20 def approach @approach end |
#conclusion ⇒ Object
Returns the value of attribute conclusion.
22 23 24 |
# File 'lib/genevalidator/validation_report.rb', line 22 def conclusion @conclusion end |
#description ⇒ Object
Returns the value of attribute description.
18 19 20 |
# File 'lib/genevalidator/validation_report.rb', line 18 def description @description end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
15 16 17 |
# File 'lib/genevalidator/validation_report.rb', line 15 def errors @errors end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
13 14 15 |
# File 'lib/genevalidator/validation_report.rb', line 13 def expected @expected end |
#explanation ⇒ Object
Returns the value of attribute explanation.
21 22 23 |
# File 'lib/genevalidator/validation_report.rb', line 21 def explanation @explanation end |
#header ⇒ Object
Returns the value of attribute header.
17 18 19 |
# File 'lib/genevalidator/validation_report.rb', line 17 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.
11 12 13 |
# File 'lib/genevalidator/validation_report.rb', line 11 def plot_files @plot_files end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
12 13 14 |
# File 'lib/genevalidator/validation_report.rb', line 12 def result @result end |
#run_time ⇒ Object
Returns the value of attribute run_time.
19 20 21 |
# File 'lib/genevalidator/validation_report.rb', line 19 def run_time @run_time end |
#short_header ⇒ Object
Returns the value of attribute short_header.
16 17 18 |
# File 'lib/genevalidator/validation_report.rb', line 16 def short_header @short_header end |
#validation_result ⇒ Object (readonly)
Returns the value of attribute validation_result.
14 15 16 |
# File 'lib/genevalidator/validation_report.rb', line 14 def validation_result @validation_result end |
Instance Method Details
#color ⇒ Object
May return “success” or “error”
60 61 62 63 64 65 66 67 68 |
# File 'lib/genevalidator/validation_report.rb', line 60 def color if validation == @expected 'success' elsif validation == :error || validation == :unapplicable 'warning' else validation == :warning ? 'warning' : 'danger' end end |
#print ⇒ Object
50 51 52 |
# File 'lib/genevalidator/validation_report.rb', line 50 def print end |
#validation ⇒ Object
54 55 56 |
# File 'lib/genevalidator/validation_report.rb', line 54 def validation validation_result end |