Class: Kreuzberg::NoChunkingReasonSmallFile

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
NoChunkingReason
Defined in:
lib/kreuzberg/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



4143
4144
4145
# File 'lib/kreuzberg/native.rb', line 4143

def size_bytes
  @size_bytes
end

#threshold_bytesObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4143
4144
4145
# File 'lib/kreuzberg/native.rb', line 4143

def threshold_bytes
  @threshold_bytes
end

Class Method Details

.from_hash(hash) ⇒ Object



4168
4169
4170
# File 'lib/kreuzberg/native.rb', line 4168

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)


4162
# File 'lib/kreuzberg/native.rb', line 4162

def chunking_disabled? = false

#fast_text_extraction?Boolean

Returns:

  • (Boolean)


4164
4165
4166
# File 'lib/kreuzberg/native.rb', line 4164

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

#few_pages?Boolean

Returns:

  • (Boolean)


4156
# File 'lib/kreuzberg/native.rb', line 4156

def few_pages? = false

#format_not_chunkable?Boolean

Returns:

  • (Boolean)


4160
# File 'lib/kreuzberg/native.rb', line 4160

def format_not_chunkable? = false

#small_file?Boolean

Returns:

  • (Boolean)


4154
# File 'lib/kreuzberg/native.rb', line 4154

def small_file? = true

#text_layer_detected?Boolean

Returns:

  • (Boolean)


4158
# File 'lib/kreuzberg/native.rb', line 4158

def text_layer_detected? = false