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)

Returns the value of attribute force_ocr

Returns:

  • (Object)

    the current value of force_ocr



794
795
796
# File 'lib/xberg/native.rb', line 794

def force_ocr
  @force_ocr
end

#page_countObject (readonly)

Returns the value of attribute page_count

Returns:

  • (Object)

    the current value of page_count



794
795
796
# File 'lib/xberg/native.rb', line 794

def page_count
  @page_count
end

Class Method Details

.from_hash(hash) ⇒ Object



815
816
817
# File 'lib/xberg/native.rb', line 815

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)


811
812
813
# File 'lib/xberg/native.rb', line 811

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

#large_file?Boolean

Returns:

  • (Boolean)


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

def large_file? = false

#many_pages?Boolean

Returns:

  • (Boolean)


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

def many_pages? = false

#ocr_required?Boolean

Returns:

  • (Boolean)


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

def ocr_required? = true