Coverage Report

File Lines Lines Of Code Untested Lines of Code Tested %
lib/ocrsdk/verifiers/status.rb 19 9 0 100.0%
 
Legend
This line was executed.
This line was not executed!
This line doesn't matter.
 
1
module OCRSDK::Verifiers::Status
24
2
  # http://ocrsdk.com/documentation/specifications/task-statuses/
3
  STATUSES = [:submitted, :queued, :in_progress, :completed, 
24
4
    :processing_failed, :deleted, :not_enough_credits]
5

              
6
  def status_to_s(status)
24
7
    status.to_s.camelize
46
8
  end
9

              
10
  def status_to_sym(status)
24
11
    status.underscore.to_sym
577
12
  end
13

              
14
  def supported_status?(status)
24
15
    status = status_to_sym status  if status.kind_of? String
69
16

              
17
    STATUSES.include? status
69
18
  end
19
end

Generated on: 2012-12-01 01:40:30 +0400