Class: ValidationReport
- Inherits:
-
Object
- Object
- ValidationReport
- Defined in:
- lib/genevalidator/validation_output.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)
-
- (Object) bg_color
readonly
Returns the value of attribute bg_color.
-
- (Object) errors
readonly
Returns the value of attribute errors.
-
- (Object) expected
readonly
Returns the value of attribute expected.
-
- (Object) message
readonly
Returns the value of attribute message.
-
- (Object) plot_files
readonly
Returns the value of attribute plot_files.
-
- (Object) result
readonly
Returns the value of attribute result.
-
- (Object) validation_result
readonly
Returns the value of attribute validation_result.
Instance Method Summary (collapse)
-
- (Object) color
May return "success" or "error".
-
- (ValidationReport) initialize(message = "Not enough evidence", validation_result = :no)
constructor
Initilizes the object Params: message: result of the validation (to be displayed in the output) bg_color: background color of the table cell for the html output (nil by default).
- - (Object) print
- - (Object) validation
Constructor Details
- (ValidationReport) initialize(message = "Not enough evidence", validation_result = :no)
Initilizes the object Params: message: result of the validation (to be displayed in the output) bg_color: background color of the table cell for the html output (nil by default)
22 23 24 25 26 27 28 |
# File 'lib/genevalidator/validation_output.rb', line 22 def initialize( = "Not enough evidence", validation_result = :no) @message = @errors = [] @result = validation_result @expected = :yes @validation_result = validation_result end |
Instance Attribute Details
- (Object) bg_color (readonly)
Returns the value of attribute bg_color
10 11 12 |
# File 'lib/genevalidator/validation_output.rb', line 10 def bg_color @bg_color end |
- (Object) errors (readonly)
Returns the value of attribute errors
15 16 17 |
# File 'lib/genevalidator/validation_output.rb', line 15 def errors @errors end |
- (Object) expected (readonly)
Returns the value of attribute expected
13 14 15 |
# File 'lib/genevalidator/validation_output.rb', line 13 def expected @expected end |
- (Object) message (readonly)
Returns the value of attribute message
9 10 11 |
# File 'lib/genevalidator/validation_output.rb', line 9 def @message end |
- (Object) plot_files (readonly)
Returns the value of attribute plot_files
11 12 13 |
# File 'lib/genevalidator/validation_output.rb', line 11 def plot_files @plot_files end |
- (Object) result (readonly)
Returns the value of attribute result
12 13 14 |
# File 'lib/genevalidator/validation_output.rb', line 12 def result @result end |
- (Object) validation_result (readonly)
Returns the value of attribute validation_result
14 15 16 |
# File 'lib/genevalidator/validation_output.rb', line 14 def validation_result @validation_result end |
Instance Method Details
- (Object) color
May return "success" or "error"
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/genevalidator/validation_output.rb', line 40 def color if bg_color != nil return bg_color end if validation == @expected return "success" else if validation == :warning return "warning" else return "danger" end end end |
- (Object) print
30 31 32 |
# File 'lib/genevalidator/validation_output.rb', line 30 def print end |
- (Object) validation
34 35 36 |
# File 'lib/genevalidator/validation_output.rb', line 34 def validation validation_result end |