Class: Xberg::NoChunkingReasonSmallFile

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

Overview

File is below size threshold.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#size_bytesObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4415
4416
4417
# File 'lib/xberg/native.rb', line 4415

def size_bytes
  @size_bytes
end

#threshold_bytesObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4415
4416
4417
# File 'lib/xberg/native.rb', line 4415

def threshold_bytes
  @threshold_bytes
end

Class Method Details

.from_hash(hash) ⇒ Object



4442
4443
4444
4445
4446
4447
# File 'lib/xberg/native.rb', line 4442

def self.from_hash(hash)
  new(
    size_bytes: hash[:size_bytes] || hash["size_bytes"],
    threshold_bytes: hash[:threshold_bytes] || hash["threshold_bytes"]
  )
end

Instance Method Details

#chunking_disabled?Boolean

Returns:

  • (Boolean)


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

def chunking_disabled? = false

#fast_text_extraction?Boolean

Returns:

  • (Boolean)


4438
4439
4440
# File 'lib/xberg/native.rb', line 4438

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

#few_pages?Boolean

Returns:

  • (Boolean)


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

def few_pages? = false

#format_not_chunkable?Boolean

Returns:

  • (Boolean)


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

def format_not_chunkable? = false

#small_file?Boolean

Returns:

  • (Boolean)


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

def small_file? = true

#text_layer_detected?Boolean

Returns:

  • (Boolean)


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

def text_layer_detected? = false