Module: OCRSDK::Verifiers::Profile

Included in:
Image
Defined in:
lib/ocrsdk/verifiers/profile.rb

Constant Summary collapse

PROFILES =
[:document_conversion, :document_archiving, :text_extraction,
:field_level_recognition, :barcode_recognition].freeze

Instance Method Summary collapse

Instance Method Details

#profile_to_s(profile) ⇒ Object



6
7
8
# File 'lib/ocrsdk/verifiers/profile.rb', line 6

def profile_to_s(profile)
  profile.to_s.camelize(:lower)
end

#supported_profile?(profile) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/ocrsdk/verifiers/profile.rb', line 10

def supported_profile?(profile)
  profile = profile.underscore.to_sym  if profile.kind_of? String

  PROFILES.include? profile
end