Class: MultiformatCV::Resume

Inherits:
Object
  • Object
show all
Defined in:
lib/multiformatcv/resume.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h = {}) ⇒ Resume

Initialize Resume

Parameters:

  • h (Hash) (defaults to: {})

    Options

Options Hash (h):



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

#contactMultiformatCV::Contact

Contact information



6
7
8
# File 'lib/multiformatcv/resume.rb', line 6

def contact
  @contact
end

#jobsArray<MultiformatCV::Job>

List of jobs

Returns:



10
11
12
# File 'lib/multiformatcv/resume.rb', line 10

def jobs
  @jobs
end

#personalMultiformatCV::Personal

Personal accomplishments and projects



20
21
22
# File 'lib/multiformatcv/resume.rb', line 20

def personal
  @personal
end

#renderedString

Rendered templates with CV data

Returns:

  • (String)


24
25
26
# File 'lib/multiformatcv/resume.rb', line 24

def rendered
  @rendered
end

#skillsHash

List of skills

Returns:

  • (Hash)


16
17
18
# File 'lib/multiformatcv/resume.rb', line 16

def skills
  @skills
end

Instance Method Details

#add_contact(h = {}) ⇒ Object

Set contact information

Parameters:

  • h (Hash) (defaults to: {})

    Hash used to initialize new MultiformatCV::Contact

See Also:



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

Parameters:

  • arr (Array<Hash>) (defaults to: [])

    List of hashes that will be used to initialize new MultiformatCV::Job entries

See Also:



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

Parameters:

  • h (Hash) (defaults to: {})

    Hash used to initialize new MultiformatCV::Personal

See Also:



68
69
70
# File 'lib/multiformatcv/resume.rb', line 68

def add_personal(h = {})
  @personal = MultiformatCV::Personal.new(h)
end