Class: MultiformatCV::Resume
- Inherits:
-
Object
- Object
- MultiformatCV::Resume
- Defined in:
- lib/multiformatcv/resume.rb
Instance Attribute Summary collapse
-
#contact ⇒ MultiformatCV::Contact
Contact information.
-
#jobs ⇒ Array<MultiformatCV::Job>
List of jobs.
-
#personal ⇒ MultiformatCV::Personal
Personal accomplishments and projects.
-
#rendered ⇒ String
Rendered templates with CV data.
-
#skills ⇒ Hash
List of skills.
Instance Method Summary collapse
-
#add_contact(h = {}) ⇒ Object
Set contact information.
-
#add_jobs(arr = []) ⇒ Object
Add list of job entries to @jobs list.
-
#add_personal(h = {}) ⇒ Object
Set personal information.
-
#initialize(h = {}) ⇒ Resume
constructor
Initialize Resume.
Constructor Details
#initialize(h = {}) ⇒ Resume
Initialize Resume
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/multiformatcv/resume.rb', line 33 def initialize(h = {}) @contact = MultiformatCV::Contact.new(h['contact'] || []) if h['contact'] @jobs = [] @skills = {} @personal = MultiformatCV::Personal.new(h['personal'] || []) if h['personal'] h['jobs'].each { |j| @jobs << MultiformatCV::Job.new(j) } if h['jobs'] estimate_skills_experience_duration! if jobs.length > 0 end |
Instance Attribute Details
#contact ⇒ MultiformatCV::Contact
Contact information
6 7 8 |
# File 'lib/multiformatcv/resume.rb', line 6 def contact @contact end |
#jobs ⇒ Array<MultiformatCV::Job>
List of jobs
10 11 12 |
# File 'lib/multiformatcv/resume.rb', line 10 def jobs @jobs end |
#personal ⇒ MultiformatCV::Personal
Personal accomplishments and projects
20 21 22 |
# File 'lib/multiformatcv/resume.rb', line 20 def personal @personal end |
#rendered ⇒ String
Rendered templates with CV data
24 25 26 |
# File 'lib/multiformatcv/resume.rb', line 24 def rendered @rendered end |
#skills ⇒ Hash
List of skills
16 17 18 |
# File 'lib/multiformatcv/resume.rb', line 16 def skills @skills end |
Instance Method Details
#add_contact(h = {}) ⇒ Object
Set contact information
48 49 50 |
# File 'lib/multiformatcv/resume.rb', line 48 def add_contact(h = {}) @contact = MultiformatCV::Contact.new(h) end |
#add_jobs(arr = []) ⇒ Object
Add list of job entries to @jobs list
59 60 61 62 |
# File 'lib/multiformatcv/resume.rb', line 59 def add_jobs(arr = []) arr.each { |j| @jobs << MultiformatCV::Job.new(j) } estimate_skills_experience_duration! end |
#add_personal(h = {}) ⇒ Object
Set personal information
68 69 70 |
# File 'lib/multiformatcv/resume.rb', line 68 def add_personal(h = {}) @personal = MultiformatCV::Personal.new(h) end |