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.
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
25 26 27 28 29 30 31 |
# File 'lib/multiformatcv/resume.rb', line 25 def initialize(h = {}) @contact = MultiformatCV::Contact.new(h['contact'] || []) if h['contact'] @jobs = [] @personal = MultiformatCV::Personal.new(h['personal'] || []) if h['personal'] h['jobs'].each { |j| @jobs << MultiformatCV::Job.new(j) } if h['jobs'] end |
Instance Attribute Details
#contact ⇒ MultiformatCV::Contact
Contact information
4 5 6 |
# File 'lib/multiformatcv/resume.rb', line 4 def contact @contact end |
#jobs ⇒ Array<MultiformatCV::Job>
List of jobs
8 9 10 |
# File 'lib/multiformatcv/resume.rb', line 8 def jobs @jobs end |
#personal ⇒ MultiformatCV::Personal
Personal accomplishments and projects
12 13 14 |
# File 'lib/multiformatcv/resume.rb', line 12 def personal @personal end |
#rendered ⇒ String
Rendered templates with CV data
16 17 18 |
# File 'lib/multiformatcv/resume.rb', line 16 def rendered @rendered end |
Instance Method Details
#add_contact(h = {}) ⇒ Object
Set contact information
37 38 39 |
# File 'lib/multiformatcv/resume.rb', line 37 def add_contact(h = {}) @contact = MultiformatCV::Contact.new(h) end |
#add_jobs(arr = []) ⇒ Object
Add list of job entries to @jobs list
48 49 50 |
# File 'lib/multiformatcv/resume.rb', line 48 def add_jobs(arr = []) arr.each { |j| @jobs << MultiformatCV::Job.new(j) } end |
#add_personal(h = {}) ⇒ Object
Set personal information
56 57 58 |
# File 'lib/multiformatcv/resume.rb', line 56 def add_personal(h = {}) @personal = MultiformatCV::Personal.new(h) end |