Skip to content

Commit 458a48a

Browse files
♻️ fix typos (#196)
1 parent 89bbeca commit 458a48a

File tree

11 files changed

+23
-17
lines changed

11 files changed

+23
-17
lines changed

docs/code_samples/default_v2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mindee_client = Mindee::ClientV2.new(api_key: api_key)
1111
params = Mindee::Input::InferenceParameters.new(
1212
# ID of the model, required.
1313
model_id,
14-
# If set to `True`, will enable Retrieval-Augmented Generation.
14+
# If set to `true`, will enable Retrieval-Augmented Generation.
1515
rag: false,
1616
)
1717

lib/mindee/input/local_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def valid_hmac_signature?(secret_key, signature)
6969
end
7070

7171
# Deserializes a loaded response
72-
# @param response_class [Parsing::V2::JobResponse, Parsing::V2::InferenceResponse] class to return.
72+
# @param response_class [Parsing::V2::CommonResponse] class to return.
7373
# @return [Parsing::V2::JobResponse, Parsing::V2::InferenceResponse]
7474
def deserialize_response(response_class)
75-
response_class.new(as_hash)
75+
response_class.new(as_hash) # : Parsing::V2::JobResponse | Parsing::V2::InferenceResponse
7676
rescue StandardError
7777
raise Errors::MindeeInputError, 'Invalid response provided.'
7878
end

lib/mindee/input/sources/local_input_source.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def compress!(quality: 85, max_width: nil, max_height: nil, force_source_text: f
166166
@io_stream.rewind
167167
end
168168

169-
# Checks whether the file has source text if it is a pdf. False otherwise
170-
# @return [bool] True if the file is a PDF and has source text.
169+
# Checks whether the file has source text if it is a pdf. `false` otherwise
170+
# @return [bool] `true` if the file is a PDF and has source text.
171171
def source_text?
172172
Mindee::PDF::PDFTools.source_text?(@io_stream)
173173
end

lib/mindee/parsing/universal/universal_object_field.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def method_missing(method_name, *_args)
7878
#
7979
# @param method_name [Symbol] The name of the method being checked.
8080
# @param include_private [bool] Whether to include private methods in the check.
81-
# @return [bool] True if the method can be responded to, false otherwise.
81+
# @return [bool] `true` if the method can be responded to, false otherwise.
8282
def respond_to_missing?(method_name, include_private = false)
8383
@all_values.key?(method_name.to_s) || super
8484
end

lib/mindee/parsing/v2/field/field_confidence.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ def self.from_string(value)
4040
end
4141

4242
# Check if this is a certain confidence level.
43-
# @return [Boolean] True if confidence is certain.
43+
# @return [Boolean] `true` if confidence is certain.
4444
def certain?
4545
@value == CERTAIN
4646
end
4747

4848
# Check if this is a high confidence level.
49-
# @return [Boolean] True if confidence is high.
49+
# @return [Boolean] `true` if confidence is high.
5050
def high?
5151
@value == HIGH
5252
end
5353

5454
# Check if this is a medium confidence level.
55-
# @return [Boolean] True if confidence is medium.
55+
# @return [Boolean] `true` if confidence is medium.
5656
def medium?
5757
@value == MEDIUM
5858
end
5959

6060
# Check if this is a low confidence level.
61-
# @return [Boolean] True if confidence is low.
61+
# @return [Boolean] `true` if confidence is low.
6262
def low?
6363
@value == LOW
6464
end
@@ -71,7 +71,7 @@ def to_s
7171

7272
# Compare two FieldConfidence instances.
7373
# @param other [FieldConfidence] The other confidence to compare.
74-
# @return [Boolean] True if they have the same value.
74+
# @return [Boolean] `true` if they have the same value.
7575
def ==(other)
7676
other.is_a?(FieldConfidence) && @value == other.value
7777
end

lib/mindee/parsing/v2/field/inference_fields.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def method_missing(method_name, *args, &block)
4343

4444
# Check if method_missing should handle the method.
4545
# @param method_name [Symbol] The method name.
46-
# @return [Boolean] True if the method should be handled.
46+
# @return [Boolean] `true` if the method should be handled.
4747
def respond_to_missing?(method_name, include_private = false)
4848
key?(method_name.to_s) || super
4949
end

lib/mindee/parsing/v2/field/list_field.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def to_s
4949
end
5050

5151
# Check if the list is empty.
52-
# @return [Boolean] True if the list has no items.
52+
# @return [Boolean] `true` if the list has no items.
5353
def empty?
5454
@items.empty?
5555
end

lib/mindee/parsing/v2/field/object_field.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def method_missing(method_name, ...)
9191

9292
# Check if method_missing should handle the method.
9393
# @param method_name [Symbol] The method name.
94-
# @return [Boolean] True if the method should be handled.
94+
# @return [Boolean] `true` if the method should be handled.
9595
def respond_to_missing?(method_name, include_private = false)
9696
@fields.respond_to?(method_name) || super
9797
end

lib/mindee/pdf/pdf_tools.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def to_io_stream(params = {})
4444
# Checks a PDFs stream content for text operators
4545
# See https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf page 243-251.
4646
# @param [StringIO] stream Stream object from a PDFs page.
47-
# @return [bool] True if a text operator is found in the stream.
47+
# @return [bool] `true` if a text operator is found in the stream.
4848
def self.stream_has_text?(stream)
4949
data = stream.data
5050
return false if data.nil? || data.empty?
@@ -55,7 +55,7 @@ def self.stream_has_text?(stream)
5555

5656
# Checks whether the file has source_text. Sends false if the file isn't a PDF.
5757
# @param [StringIO] pdf_data Abinary-encoded stream representing the PDF file.
58-
# @return [bool] True if the pdf has source text, false otherwise.
58+
# @return [bool] `true` if the pdf has source text, false otherwise.
5959
def self.source_text?(pdf_data)
6060
begin
6161
pdf_data.rewind

sig/mindee/input/local_response.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Mindee
88
def self.process_secret_key: (String) -> String
99
def get_hmac_signature: (String) -> String
1010
def valid_hmac_signature?: (String, String) -> bool
11-
def deserialize_response: (singleton(Parsing::V2::JobResponse) | singleton(Parsing::V2::InferenceResponse))-> (Parsing::V2::JobResponse | Parsing::V2::InferenceResponse)
11+
def deserialize_response: (singleton(Parsing::V2::CommonResponse))-> (Parsing::V2::JobResponse | Parsing::V2::InferenceResponse)
1212
end
1313
end
1414
end

0 commit comments

Comments
 (0)