Class: Recog::Verifier
- Inherits:
-
Object
- Object
- Recog::Verifier
- Defined in:
- lib/recog/verifier.rb
Instance Attribute Summary collapse
-
#fingerprints ⇒ Object
readonly
Returns the value of attribute fingerprints.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Instance Method Summary collapse
-
#initialize(fingerprints, reporter) ⇒ Verifier
constructor
A new instance of Verifier.
- #verify ⇒ Object
Constructor Details
#initialize(fingerprints, reporter) ⇒ Verifier
Returns a new instance of Verifier.
5 6 7 8 |
# File 'lib/recog/verifier.rb', line 5 def initialize(fingerprints, reporter) @fingerprints = fingerprints @reporter = reporter end |
Instance Attribute Details
#fingerprints ⇒ Object (readonly)
Returns the value of attribute fingerprints.
3 4 5 |
# File 'lib/recog/verifier.rb', line 3 def fingerprints @fingerprints end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
3 4 5 |
# File 'lib/recog/verifier.rb', line 3 def reporter @reporter end |
Instance Method Details
#verify ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/recog/verifier.rb', line 10 def verify reporter.report(fingerprints.count) do fingerprints.each do |fp| reporter.print_name fp fp.verify_params do |status, | case status when :warn reporter.warning "WARN: #{}" when :fail reporter.failure "FAIL: #{}" when :success reporter.success() end end fp.verify_tests do |status, | case status when :warn reporter.warning "WARN: #{}" when :fail reporter.failure "FAIL: #{}" when :success reporter.success() end end end end end |