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):



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

#contactMultiformatCV::Contact

Contact information



4
5
6
# File 'lib/multiformatcv/resume.rb', line 4

def contact
  @contact
end

#jobsArray<MultiformatCV::Job>

List of jobs

Returns:



8
9
10
# File 'lib/multiformatcv/resume.rb', line 8

def jobs
  @jobs
end

#personalMultiformatCV::Personal

Personal accomplishments and projects



12
13
14
# File 'lib/multiformatcv/resume.rb', line 12

def personal
  @personal
end

#renderedString

Rendered templates with CV data

Returns:

  • (String)


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

def rendered
  @rendered
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:



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

Parameters:

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

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

See Also:



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

Parameters:

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

    Hash used to initialize new MultiformatCV::Personal

See Also:



56
57
58
# File 'lib/multiformatcv/resume.rb', line 56

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