Class: Mindee::Product::Resume::ResumeV1ProfessionalExperiences
- Inherits:
-
Array
- Object
- Array
- Mindee::Product::Resume::ResumeV1ProfessionalExperiences
- Defined in:
- lib/mindee/product/resume/resume_v1_professional_experiences.rb
Overview
The list of the candidate’s professional experiences.
Instance Attribute Summary collapse
-
#entries ⇒ Array<ResumeV1ProfessionalExperience>
readonly
Entries.
Class Method Summary collapse
-
.line_items_separator(char) ⇒ String
Creates a line of rST table-compliant string separators.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ ResumeV1ProfessionalExperiences
constructor
A new instance of ResumeV1ProfessionalExperiences.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ ResumeV1ProfessionalExperiences
Returns a new instance of ResumeV1ProfessionalExperiences.
20 21 22 23 24 25 |
# File 'lib/mindee/product/resume/resume_v1_professional_experiences.rb', line 20 def initialize(prediction, page_id) entries = prediction.map do |entry| Resume::ResumeV1ProfessionalExperience.new(entry, page_id) end super(entries) end |
Instance Attribute Details
#entries ⇒ Array<ResumeV1ProfessionalExperience> (readonly)
Entries.
16 17 18 |
# File 'lib/mindee/product/resume/resume_v1_professional_experiences.rb', line 16 def entries @entries end |
Class Method Details
.line_items_separator(char) ⇒ String
Creates a line of rST table-compliant string separators.
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mindee/product/resume/resume_v1_professional_experiences.rb', line 30 def self.line_items_separator(char) out_str = String.new out_str << "+#{char * 17}" out_str << "+#{char * 12}" out_str << "+#{char * 38}" out_str << "+#{char * 27}" out_str << "+#{char * 11}" out_str << "+#{char * 10}" out_str << "+#{char * 22}" out_str << "+#{char * 13}" out_str << "+#{char * 12}" out_str end |
Instance Method Details
#to_s ⇒ String
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mindee/product/resume/resume_v1_professional_experiences.rb', line 45 def to_s return '' if empty? lines = map do |entry| "\n #{entry.to_table_line}\n#{self.class.line_items_separator('-')}" end.join out_str = String.new out_str << ("\n#{self.class.line_items_separator('-')}\n ") out_str << ' | Contract Type ' out_str << ' | Department' out_str << ' | Description ' out_str << ' | Employer ' out_str << ' | End Month' out_str << ' | End Year' out_str << ' | Role ' out_str << ' | Start Month' out_str << ' | Start Year' out_str << (" |\n#{self.class.line_items_separator('=')}") out_str + lines end |