Class: Xberg::ChunkingReasonOcrRequired

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
ChunkingReason
Defined in:
lib/xberg/native.rb

Overview

PDF requires OCR and is large.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#force_ocrObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4784
4785
4786
# File 'lib/xberg/native.rb', line 4784

def force_ocr
  @force_ocr
end

#page_countObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4784
4785
4786
# File 'lib/xberg/native.rb', line 4784

def page_count
  @page_count
end

Class Method Details

.from_hash(hash) ⇒ Object



4807
4808
4809
# File 'lib/xberg/native.rb', line 4807

def self.from_hash(hash)
  new(page_count: hash[:page_count] || hash["page_count"], force_ocr: hash[:force_ocr] || hash["force_ocr"])
end

Instance Method Details

#large_and_many_pages?Boolean

Returns:

  • (Boolean)


4803
4804
4805
# File 'lib/xberg/native.rb', line 4803

def large_and_many_pages? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#large_file?Boolean

Returns:

  • (Boolean)


4797
# File 'lib/xberg/native.rb', line 4797

def large_file? = false

#many_pages?Boolean

Returns:

  • (Boolean)


4799
# File 'lib/xberg/native.rb', line 4799

def many_pages? = false

#ocr_required?Boolean

Returns:

  • (Boolean)


4801
# File 'lib/xberg/native.rb', line 4801

def ocr_required? = true