Class: Mindee::V1::Product::Resume::ResumeV1Education
- Inherits:
-
Mindee::V1::Parsing::Standard::FeatureField
- Object
- Mindee::V1::Parsing::Standard::AbstractField
- Mindee::V1::Parsing::Standard::FeatureField
- Mindee::V1::Product::Resume::ResumeV1Education
- Includes:
- Mindee::V1::Parsing::Standard
- Defined in:
- lib/mindee/v1/product/resume/resume_v1_education.rb
Overview
The list of the candidate’s educational background.
Instance Attribute Summary collapse
-
#degree_domain ⇒ String
readonly
The area of study or specialization.
-
#degree_type ⇒ String
readonly
The type of degree obtained, such as Bachelor’s, Master’s, or Doctorate.
-
#end_month ⇒ String
readonly
The month when the education program or course was completed.
-
#end_year ⇒ String
readonly
The year when the education program or course was completed.
-
#school ⇒ String
readonly
The name of the school.
-
#start_month ⇒ String
readonly
The month when the education program or course began.
-
#start_year ⇒ String
readonly
The year when the education program or course began.
Attributes inherited from Mindee::V1::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ ResumeV1Education
constructor
A new instance of ResumeV1Education.
- #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) ⇒ ResumeV1Education
Returns a new instance of ResumeV1Education.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 37 def initialize(prediction, page_id) super @degree_domain = prediction['degree_domain'] @degree_type = prediction['degree_type'] @end_month = prediction['end_month'] @end_year = prediction['end_year'] @school = prediction['school'] @start_month = prediction['start_month'] @start_year = prediction['start_year'] @page_id = page_id end |
Instance Attribute Details
#degree_domain ⇒ String (readonly)
The area of study or specialization.
15 16 17 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 15 def degree_domain @degree_domain end |
#degree_type ⇒ String (readonly)
The type of degree obtained, such as Bachelor’s, Master’s, or Doctorate.
18 19 20 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 18 def degree_type @degree_type end |
#end_month ⇒ String (readonly)
The month when the education program or course was completed.
21 22 23 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 21 def end_month @end_month end |
#end_year ⇒ String (readonly)
The year when the education program or course was completed.
24 25 26 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 24 def end_year @end_year end |
#school ⇒ String (readonly)
The name of the school.
27 28 29 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 27 def school @school end |
#start_month ⇒ String (readonly)
The month when the education program or course began.
30 31 32 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 30 def start_month @start_month end |
#start_year ⇒ String (readonly)
The year when the education program or course began.
33 34 35 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 33 def start_year @start_year end |
Instance Method Details
#printable_values ⇒ Hash
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 50 def printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:degree_domain] = format_for_display(@degree_domain) printable[:degree_type] = format_for_display(@degree_type) printable[:end_month] = format_for_display(@end_month) printable[:end_year] = format_for_display(@end_year) printable[:school] = format_for_display(@school) printable[:start_month] = format_for_display(@start_month) printable[:start_year] = format_for_display(@start_year) printable end |
#table_printable_values ⇒ Hash
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 63 def table_printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:degree_domain] = format_for_display(@degree_domain, 15) printable[:degree_type] = format_for_display(@degree_type, 25) printable[:end_month] = format_for_display(@end_month, nil) printable[:end_year] = format_for_display(@end_year, nil) printable[:school] = format_for_display(@school, 25) printable[:start_month] = format_for_display(@start_month, nil) printable[:start_year] = format_for_display(@start_year, nil) printable end |
#to_s ⇒ String
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 90 def to_s printable = printable_values out_str = String.new out_str << "\n :Domain: #{printable[:degree_domain]}" out_str << "\n :Degree: #{printable[:degree_type]}" out_str << "\n :End Month: #{printable[:end_month]}" out_str << "\n :End Year: #{printable[:end_year]}" out_str << "\n :School: #{printable[:school]}" out_str << "\n :Start Month: #{printable[:start_month]}" out_str << "\n :Start Year: #{printable[:start_year]}" out_str end |
#to_table_line ⇒ String
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/mindee/v1/product/resume/resume_v1_education.rb', line 76 def to_table_line printable = table_printable_values out_str = String.new out_str << format('| %- 16s', printable[:degree_domain]) out_str << format('| %- 26s', printable[:degree_type]) out_str << format('| %- 10s', printable[:end_month]) out_str << format('| %- 9s', printable[:end_year]) out_str << format('| %- 26s', printable[:school]) out_str << format('| %- 12s', printable[:start_month]) out_str << format('| %- 11s', printable[:start_year]) out_str << '|' end |