Class: Mindee::V1::Product::Resume::ResumeV1ProfessionalExperience
- Inherits:
-
Mindee::V1::Parsing::Standard::FeatureField
- Object
- Mindee::V1::Parsing::Standard::AbstractField
- Mindee::V1::Parsing::Standard::FeatureField
- Mindee::V1::Product::Resume::ResumeV1ProfessionalExperience
- Includes:
- Mindee::V1::Parsing::Standard
- Defined in:
- lib/mindee/v1/product/resume/resume_v1_professional_experience.rb
Overview
The list of the candidate's professional experiences.
Instance Attribute Summary collapse
-
#contract_type ⇒ String
readonly
The type of contract for the professional experience.
-
#department ⇒ String
readonly
The specific department or division within the company.
-
#description ⇒ String
readonly
The description of the professional experience as written in the document.
-
#employer ⇒ String
readonly
The name of the company or organization.
-
#end_month ⇒ String
readonly
The month when the professional experience ended.
-
#end_year ⇒ String
readonly
The year when the professional experience ended.
-
#role ⇒ String
readonly
The position or job title held by the candidate.
-
#start_month ⇒ String
readonly
The month when the professional experience began.
-
#start_year ⇒ String
readonly
The year when the professional experience began.
Attributes inherited from Mindee::V1::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ ResumeV1ProfessionalExperience
constructor
A new instance of ResumeV1ProfessionalExperience.
- #printable_values ⇒ Hash
- #table_printable_values ⇒ Hash
- #to_s ⇒ String
- #to_table_line ⇒ String
Methods inherited from Mindee::V1::Parsing::Standard::FeatureField
Methods inherited from Mindee::V1::Parsing::Standard::AbstractField
array_confidence, array_sum, float_to_string
Constructor Details
#initialize(prediction, page_id) ⇒ ResumeV1ProfessionalExperience
Returns a new instance of ResumeV1ProfessionalExperience.
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 43 def initialize(prediction, page_id) super @contract_type = prediction['contract_type'] @department = prediction['department'] @description = prediction['description'] @employer = prediction['employer'] @end_month = prediction['end_month'] @end_year = prediction['end_year'] @role = prediction['role'] @start_month = prediction['start_month'] @start_year = prediction['start_year'] @page_id = page_id end |
Instance Attribute Details
#contract_type ⇒ String (readonly)
The type of contract for the professional experience.
15 16 17 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 15 def contract_type @contract_type end |
#department ⇒ String (readonly)
The specific department or division within the company.
18 19 20 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 18 def department @department end |
#description ⇒ String (readonly)
The description of the professional experience as written in the document.
21 22 23 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 21 def description @description end |
#employer ⇒ String (readonly)
The name of the company or organization.
24 25 26 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 24 def employer @employer end |
#end_month ⇒ String (readonly)
The month when the professional experience ended.
27 28 29 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 27 def end_month @end_month end |
#end_year ⇒ String (readonly)
The year when the professional experience ended.
30 31 32 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 30 def end_year @end_year end |
#role ⇒ String (readonly)
The position or job title held by the candidate.
33 34 35 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 33 def role @role end |
#start_month ⇒ String (readonly)
The month when the professional experience began.
36 37 38 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 36 def start_month @start_month end |
#start_year ⇒ String (readonly)
The year when the professional experience began.
39 40 41 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 39 def start_year @start_year end |
Instance Method Details
#printable_values ⇒ Hash
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 58 def printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:contract_type] = format_for_display(@contract_type) printable[:department] = format_for_display(@department) printable[:description] = format_for_display(@description) printable[:employer] = format_for_display(@employer) printable[:end_month] = format_for_display(@end_month) printable[:end_year] = format_for_display(@end_year) printable[:role] = format_for_display(@role) printable[:start_month] = format_for_display(@start_month) printable[:start_year] = format_for_display(@start_year) printable end |
#table_printable_values ⇒ Hash
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 73 def table_printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:contract_type] = format_for_display(@contract_type, 15) printable[:department] = format_for_display(@department, 10) printable[:description] = format_for_display(@description, 36) printable[:employer] = format_for_display(@employer, 25) printable[:end_month] = format_for_display(@end_month, nil) printable[:end_year] = format_for_display(@end_year, nil) printable[:role] = format_for_display(@role, 20) printable[:start_month] = format_for_display(@start_month, nil) printable[:start_year] = format_for_display(@start_year, nil) printable end |
#to_s ⇒ String
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 104 def to_s printable = printable_values out_str = String.new out_str << "\n :Contract Type: #{printable[:contract_type]}" out_str << "\n :Department: #{printable[:department]}" out_str << "\n :Description: #{printable[:description]}" out_str << "\n :Employer: #{printable[:employer]}" out_str << "\n :End Month: #{printable[:end_month]}" out_str << "\n :End Year: #{printable[:end_year]}" out_str << "\n :Role: #{printable[:role]}" out_str << "\n :Start Month: #{printable[:start_month]}" out_str << "\n :Start Year: #{printable[:start_year]}" out_str end |
#to_table_line ⇒ String
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/mindee/v1/product/resume/resume_v1_professional_experience.rb', line 88 def to_table_line printable = table_printable_values out_str = String.new out_str << format('| %- 16s', printable[:contract_type]) out_str << format('| %- 11s', printable[:department]) out_str << format('| %- 37s', printable[:description]) out_str << format('| %- 26s', printable[:employer]) out_str << format('| %- 10s', printable[:end_month]) out_str << format('| %- 9s', printable[:end_year]) out_str << format('| %- 21s', printable[:role]) out_str << format('| %- 12s', printable[:start_month]) out_str << format('| %- 11s', printable[:start_year]) out_str << '|' end |