class MultiformatCV::Resume

Attributes

contact[RW]

Contact information @return [MultiformatCV::Contact]

jobs[RW]

List of jobs @return [Array<MultiformatCV::Job>]

personal[RW]

Personal accomplishments and projects @return [MultiformatCV::Personal]

rendered[RW]

Rendered templates with CV data @return [String]

Public Class Methods

new(h = {}) click to toggle source

Initialize Resume

@param [Hash] h Options @option h [Array<MultiformatCV::Contact>] 'contact' Contact information @option h [Array<MultiformatCV::Job>] 'jobs' Jobs list @option h [Array<MultiformatCV::Personal>] 'personal' Personal information

# 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

Public Instance Methods

add_contact(h = {}) click to toggle source

Set contact information @param [Hash] h Hash used to initialize new MultiformatCV::Contact @see MultiformatCV::Contact

# File lib/multiformatcv/resume.rb, line 37
def add_contact(h = {})
  @contact = MultiformatCV::Contact.new(h)
end
add_jobs(arr = []) click to toggle source

Add list of job entries to @jobs list

@param [Array<Hash>] arr List of hashes that will be used to initialize new

MultiformatCV::Job entries

@see MultiformatCV::Job

# File lib/multiformatcv/resume.rb, line 48
def add_jobs(arr = [])
  arr.each { |j| @jobs << MultiformatCV::Job.new(j) }
end
add_personal(h = {}) click to toggle source

Set personal information @param [Hash] h Hash used to initialize new MultiformatCV::Personal @see MultiformatCV::Personal

# File lib/multiformatcv/resume.rb, line 56
def add_personal(h = {})
  @personal = MultiformatCV::Personal.new(h)
end