Skip to content

Commit fce1b8b

Browse files
fix rubocop
1 parent f44dab6 commit fce1b8b

25 files changed

+54
-54
lines changed

lib/mindee/parsing/common/document.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def inject_full_text_ocr(raw_prediction)
6969

7070
full_text_ocr = String.new
7171
raw_prediction.dig('inference', 'pages').each do |page|
72-
full_text_ocr << (page['extras']['full_text_ocr']['content'])
72+
full_text_ocr << page['extras']['full_text_ocr']['content']
7373
end
7474
artificial_text_obj = { 'content' => full_text_ocr }
7575
if @extras.nil? || @extras.empty?

lib/mindee/parsing/standard/tax_field.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ def print_float(value)
3939
def to_s
4040
printable = printable_values
4141
out_str = String.new
42-
out_str << ("Base: #{printable[:base]}")
43-
out_str << (", Code: #{printable[:code]}")
44-
out_str << (", Rate (%): #{printable[:rate]}")
45-
out_str << (", Amount: #{printable[:value]}")
42+
out_str << "Base: #{printable[:base]}"
43+
out_str << ", Code: #{printable[:code]}"
44+
out_str << ", Rate (%): #{printable[:rate]}"
45+
out_str << ", Amount: #{printable[:value]}"
4646
out_str.strip
4747
end
4848

@@ -60,10 +60,10 @@ def printable_values
6060
def to_table_line
6161
printable = printable_values
6262
out_str = String.new
63-
out_str << ("| #{printable[:base].ljust(13, ' ')}")
64-
out_str << (" | #{printable[:code].ljust(6, ' ')}")
65-
out_str << (" | #{printable[:rate].ljust(8, ' ')}")
66-
out_str << (" | #{printable[:value].ljust(13, ' ')} |")
63+
out_str << "| #{printable[:base].ljust(13, ' ')}"
64+
out_str << " | #{printable[:code].ljust(6, ' ')}"
65+
out_str << " | #{printable[:rate].ljust(8, ' ')}"
66+
out_str << " | #{printable[:value].ljust(13, ' ')} |"
6767
out_str.strip
6868
end
6969
end
@@ -94,7 +94,7 @@ def to_s
9494
return '' if nil? || empty?
9595

9696
out_str = String.new
97-
out_str << ("\n#{line_separator('-')}")
97+
out_str << "\n#{line_separator('-')}"
9898
out_str << "\n | Base | Code | Rate (%) | Amount |"
9999
out_str << "\n#{line_separator('=')}"
100100
each do |entry|

lib/mindee/pdf/pdf_extractor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def extract_sub_documents(page_indexes)
5858
end
5959
formatted_max_index = format('%03d', page_index_list[page_index_list.length - 1] + 1).to_s
6060
field_filename = "#{basename}_#{format('%03d',
61-
(page_index_list[0] + 1))}-#{formatted_max_index}#{extension}"
61+
page_index_list[0] + 1)}-#{formatted_max_index}#{extension}"
6262
extracted_pdf = Mindee::PDF::PDFExtractor::ExtractedPDF.new(cut_pages(page_index_list),
6363
field_filename)
6464
extracted_pdfs << extracted_pdf

lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_items.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ def to_s
4646
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4747
end.join
4848
out_str = String.new
49-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
49+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5050
out_str << ' | Description '
5151
out_str << ' | Gross Weight'
5252
out_str << ' | Measurement'
5353
out_str << ' | Measurement Unit'
5454
out_str << ' | Quantity'
5555
out_str << ' | Weight Unit'
56-
out_str << (" |\n#{self.class.line_items_separator('=')}")
56+
out_str << " |\n#{self.class.line_items_separator('=')}"
5757
out_str + lines
5858
end
5959
end

lib/mindee/product/financial_document/financial_document_v1_line_items.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def to_s
4444
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4545
end.join
4646
out_str = String.new
47-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
47+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4848
out_str << ' | Description '
4949
out_str << ' | Product code'
5050
out_str << ' | Quantity'
@@ -53,7 +53,7 @@ def to_s
5353
out_str << ' | Total Amount'
5454
out_str << ' | Unit of measure'
5555
out_str << ' | Unit Price'
56-
out_str << (" |\n#{self.class.line_items_separator('=')}")
56+
out_str << " |\n#{self.class.line_items_separator('=')}"
5757
out_str + lines
5858
end
5959
end

lib/mindee/product/fr/bank_statement/bank_statement_v2_transactions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def to_s
4040
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4141
end.join
4242
out_str = String.new
43-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
43+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4444
out_str << ' | Amount '
4545
out_str << ' | Date '
4646
out_str << ' | Description '
47-
out_str << (" |\n#{self.class.line_items_separator('=')}")
47+
out_str << " |\n#{self.class.line_items_separator('=')}"
4848
out_str + lines
4949
end
5050
end

lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def to_s
5050
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
5151
end.join
5252
out_str = String.new
53-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
53+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5454
out_str << ' | Consumption'
5555
out_str << ' | Description '
5656
out_str << ' | End Date '
@@ -59,7 +59,7 @@ def to_s
5959
out_str << ' | Total '
6060
out_str << ' | Unit of Measure'
6161
out_str << ' | Unit Price'
62-
out_str << (" |\n#{self.class.line_items_separator('=')}")
62+
out_str << " |\n#{self.class.line_items_separator('=')}"
6363
out_str + lines
6464
end
6565
end

lib/mindee/product/fr/energy_bill/energy_bill_v1_subscriptions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def to_s
4848
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4949
end.join
5050
out_str = String.new
51-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
51+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5252
out_str << ' | Description '
5353
out_str << ' | End Date '
5454
out_str << ' | Start Date'
5555
out_str << ' | Tax Rate'
5656
out_str << ' | Total '
5757
out_str << ' | Unit Price'
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contributions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def to_s
4848
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4949
end.join
5050
out_str = String.new
51-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
51+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5252
out_str << ' | Description '
5353
out_str << ' | End Date '
5454
out_str << ' | Start Date'
5555
out_str << ' | Tax Rate'
5656
out_str << ' | Total '
5757
out_str << ' | Unit Price'
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

lib/mindee/product/fr/payslip/payslip_v2_salary_details.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ def to_s
4848
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4949
end.join
5050
out_str = String.new
51-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
51+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5252
out_str << ' | Amount '
5353
out_str << ' | Base '
5454
out_str << ' | Description '
5555
out_str << ' | Rate '
56-
out_str << (" |\n#{self.class.line_items_separator('=')}")
56+
out_str << " |\n#{self.class.line_items_separator('=')}"
5757
out_str + lines
5858
end
5959
end

lib/mindee/product/fr/payslip/payslip_v3_paid_time_offs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def to_s
4949
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
5050
end.join
5151
out_str = String.new
52-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
52+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5353
out_str << ' | Accrued '
5454
out_str << ' | Period'
5555
out_str << ' | Type '
5656
out_str << ' | Remaining'
5757
out_str << ' | Used '
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

lib/mindee/product/fr/payslip/payslip_v3_salary_details.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def to_s
4949
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
5050
end.join
5151
out_str = String.new
52-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
52+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5353
out_str << ' | Amount '
5454
out_str << ' | Base '
5555
out_str << ' | Description '
5656
out_str << ' | Number'
5757
out_str << ' | Rate '
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

lib/mindee/product/invoice/invoice_v4_line_items.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def to_s
4444
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4545
end.join
4646
out_str = String.new
47-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
47+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4848
out_str << ' | Description '
4949
out_str << ' | Product code'
5050
out_str << ' | Quantity'
@@ -53,7 +53,7 @@ def to_s
5353
out_str << ' | Total Amount'
5454
out_str << ' | Unit of measure'
5555
out_str << ' | Unit Price'
56-
out_str << (" |\n#{self.class.line_items_separator('=')}")
56+
out_str << " |\n#{self.class.line_items_separator('=')}"
5757
out_str + lines
5858
end
5959
end

lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def to_s
3737
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
3838
end.join
3939
out_str = String.new
40-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
40+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4141
out_str << ' | Page Indexes '
42-
out_str << (" |\n#{self.class.line_items_separator('=')}")
42+
out_str << " |\n#{self.class.line_items_separator('=')}"
4343
out_str + lines
4444
end
4545
end

lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrients.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def to_s
5353
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
5454
end.join
5555
out_str = String.new
56-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
56+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5757
out_str << ' | Daily Value'
5858
out_str << ' | Name '
5959
out_str << ' | Per 100g'
6060
out_str << ' | Per Serving'
6161
out_str << ' | Unit'
62-
out_str << (" |\n#{self.class.line_items_separator('=')}")
62+
out_str << " |\n#{self.class.line_items_separator('=')}"
6363
out_str + lines
6464
end
6565
end

lib/mindee/product/receipt/receipt_v5_line_items.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ def to_s
4040
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4141
end.join
4242
out_str = String.new
43-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
43+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4444
out_str << ' | Description '
4545
out_str << ' | Quantity'
4646
out_str << ' | Total Amount'
4747
out_str << ' | Unit Price'
48-
out_str << (" |\n#{self.class.line_items_separator('=')}")
48+
out_str << " |\n#{self.class.line_items_separator('=')}"
4949
out_str + lines
5050
end
5151
end

lib/mindee/product/resume/resume_v1_certificates.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ def to_s
4444
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4545
end.join
4646
out_str = String.new
47-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
47+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4848
out_str << ' | Grade '
4949
out_str << ' | Name '
5050
out_str << ' | Provider '
5151
out_str << ' | Year'
52-
out_str << (" |\n#{self.class.line_items_separator('=')}")
52+
out_str << " |\n#{self.class.line_items_separator('=')}"
5353
out_str + lines
5454
end
5555
end

lib/mindee/product/resume/resume_v1_educations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ def to_s
4747
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4848
end.join
4949
out_str = String.new
50-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
50+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5151
out_str << ' | Domain '
5252
out_str << ' | Degree '
5353
out_str << ' | End Month'
5454
out_str << ' | End Year'
5555
out_str << ' | School '
5656
out_str << ' | Start Month'
5757
out_str << ' | Start Year'
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

lib/mindee/product/resume/resume_v1_languages.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def to_s
4242
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4343
end.join
4444
out_str = String.new
45-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
45+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4646
out_str << ' | Language'
4747
out_str << ' | Level '
48-
out_str << (" |\n#{self.class.line_items_separator('=')}")
48+
out_str << " |\n#{self.class.line_items_separator('=')}"
4949
out_str + lines
5050
end
5151
end

lib/mindee/product/resume/resume_v1_professional_experiences.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def to_s
4949
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
5050
end.join
5151
out_str = String.new
52-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
52+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5353
out_str << ' | Contract Type '
5454
out_str << ' | Department'
5555
out_str << ' | Description '
@@ -59,7 +59,7 @@ def to_s
5959
out_str << ' | Role '
6060
out_str << ' | Start Month'
6161
out_str << ' | Start Year'
62-
out_str << (" |\n#{self.class.line_items_separator('=')}")
62+
out_str << " |\n#{self.class.line_items_separator('=')}"
6363
out_str + lines
6464
end
6565
end

lib/mindee/product/resume/resume_v1_social_networks_urls.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def to_s
4242
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4343
end.join
4444
out_str = String.new
45-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
45+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4646
out_str << ' | Name '
4747
out_str << ' | URL '
48-
out_str << (" |\n#{self.class.line_items_separator('=')}")
48+
out_str << " |\n#{self.class.line_items_separator('=')}"
4949
out_str + lines
5050
end
5151
end

lib/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ def to_s
3939
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4040
end.join
4141
out_str = String.new
42-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
42+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4343
out_str << ' | Service Fees'
4444
out_str << ' | Service Name '
45-
out_str << (" |\n#{self.class.line_items_separator('=')}")
45+
out_str << " |\n#{self.class.line_items_separator('=')}"
4646
out_str + lines
4747
end
4848
end

lib/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ def to_s
4545
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4646
end.join
4747
out_str = String.new
48-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
48+
out_str << "\n#{self.class.line_items_separator('-')}\n "
4949
out_str << ' | City '
5050
out_str << ' | Complete Address '
5151
out_str << ' | Is Address Change'
5252
out_str << ' | Postal Code'
5353
out_str << ' | Private Mailbox Number'
5454
out_str << ' | State'
5555
out_str << ' | Street '
56-
out_str << (" |\n#{self.class.line_items_separator('=')}")
56+
out_str << " |\n#{self.class.line_items_separator('=')}"
5757
out_str + lines
5858
end
5959
end

lib/mindee/product/us/us_mail/us_mail_v3_recipient_addresses.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def to_s
4646
"\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}"
4747
end.join
4848
out_str = String.new
49-
out_str << ("\n#{self.class.line_items_separator('-')}\n ")
49+
out_str << "\n#{self.class.line_items_separator('-')}\n "
5050
out_str << ' | City '
5151
out_str << ' | Complete Address '
5252
out_str << ' | Is Address Change'
@@ -55,7 +55,7 @@ def to_s
5555
out_str << ' | State'
5656
out_str << ' | Street '
5757
out_str << ' | Unit '
58-
out_str << (" |\n#{self.class.line_items_separator('=')}")
58+
out_str << " |\n#{self.class.line_items_separator('=')}"
5959
out_str + lines
6060
end
6161
end

0 commit comments

Comments
 (0)