Class: Mindee::V1::Product::Resume::ResumeV1SocialNetworksUrl
- Inherits:
-
Mindee::V1::Parsing::Standard::FeatureField
- Object
- Mindee::V1::Parsing::Standard::AbstractField
- Mindee::V1::Parsing::Standard::FeatureField
- Mindee::V1::Product::Resume::ResumeV1SocialNetworksUrl
- Includes:
- Mindee::V1::Parsing::Standard
- Defined in:
- lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb
Overview
The list of social network profiles of the candidate.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the social network.
-
#url ⇒ String
readonly
The URL of the social network.
Attributes inherited from Mindee::V1::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ ResumeV1SocialNetworksUrl
constructor
A new instance of ResumeV1SocialNetworksUrl.
- #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) ⇒ ResumeV1SocialNetworksUrl
Returns a new instance of ResumeV1SocialNetworksUrl.
22 23 24 25 26 27 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 22 def initialize(prediction, page_id) super @name = prediction['name'] @url = prediction['url'] @page_id = page_id end |
Instance Attribute Details
#name ⇒ String (readonly)
The name of the social network.
15 16 17 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 15 def name @name end |
#url ⇒ String (readonly)
The URL of the social network.
18 19 20 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 18 def url @url end |
Instance Method Details
#printable_values ⇒ Hash
30 31 32 33 34 35 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 30 def printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:name] = format_for_display(@name) printable[:url] = format_for_display(@url) printable end |
#table_printable_values ⇒ Hash
38 39 40 41 42 43 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 38 def table_printable_values printable = {} # @type var printable: Hash[Symbol, String] printable[:name] = format_for_display(@name, 20) printable[:url] = format_for_display(@url, 50) printable end |
#to_s ⇒ String
55 56 57 58 59 60 61 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 55 def to_s printable = printable_values out_str = String.new out_str << "\n :Name: #{printable[:name]}" out_str << "\n :URL: #{printable[:url]}" out_str end |
#to_table_line ⇒ String
46 47 48 49 50 51 52 |
# File 'lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb', line 46 def to_table_line printable = table_printable_values out_str = String.new out_str << format('| %- 21s', printable[:name]) out_str << format('| %- 51s', printable[:url]) out_str << '|' end |