Class: Recog::Verifier
- Inherits:
-
Object
- Object
- Recog::Verifier
- Defined in:
- lib/recog/verifier.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Instance Method Summary collapse
-
#initialize(db, reporter) ⇒ Verifier
constructor
A new instance of Verifier.
- #verify ⇒ Object
Constructor Details
#initialize(db, reporter) ⇒ Verifier
Returns a new instance of Verifier.
7 8 9 10 |
# File 'lib/recog/verifier.rb', line 7 def initialize(db, reporter) @db = db @reporter = reporter end |
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
5 6 7 |
# File 'lib/recog/verifier.rb', line 5 def db @db end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
5 6 7 |
# File 'lib/recog/verifier.rb', line 5 def reporter @reporter end |
Instance Method Details
#verify ⇒ Object
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 38 39 |
# File 'lib/recog/verifier.rb', line 12 def verify reporter.report(db.fingerprints.count) do db.fingerprints.each do |fp| reporter.print_name fp fp.verify_params do |status, | case status when :warn reporter.warning , fp.line when :fail reporter.failure , fp.line when :success reporter.success() end end fp.verify_tests do |status, | case status when :warn reporter.warning , fp.line when :fail reporter.failure , fp.line when :success reporter.success() end end end end end |