Class: Dragnet::Verifiers::Verifier
- Inherits:
-
Object
- Object
- Dragnet::Verifiers::Verifier
- Includes:
- Helpers::RepositoryHelper
- Defined in:
- lib/dragnet/verifiers/verifier.rb
Overview
Base class for all validators.
Direct Known Subclasses
ReposVerifier, RepositoryVerifier, ResultVerifier, TestRecordVerifier
Instance Attribute Summary collapse
-
#test_record ⇒ Object
readonly
Returns the value of attribute test_record.
Instance Method Summary collapse
-
#initialize(test_record:) ⇒ Verifier
constructor
Creates a new instance of the class.
-
#verify ⇒ Dragnet::VerificationResult?
Needs to be implemented by the child classes.
Methods included from Helpers::RepositoryHelper
#relative_to_repo, #repo_base, #shorten_sha1
Constructor Details
#initialize(test_record:) ⇒ Verifier
Creates a new instance of the class.
16 17 18 |
# File 'lib/dragnet/verifiers/verifier.rb', line 16 def initialize(test_record:) @test_record = test_record end |
Instance Attribute Details
#test_record ⇒ Object (readonly)
Returns the value of attribute test_record.
11 12 13 |
# File 'lib/dragnet/verifiers/verifier.rb', line 11 def test_record @test_record end |
Instance Method Details
#verify ⇒ Dragnet::VerificationResult?
Needs to be implemented by the child classes. This method is called to perform the verification on the given test_record
.
25 26 27 |
# File 'lib/dragnet/verifiers/verifier.rb', line 25 def verify raise NotImplementedError, "Please implement #{__method__} in #{self.class}" end |