Class: MultiformatCV::Job

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h = {}) ⇒ Job

Create Job instance

Example:

job = MultiformatCV::Job.new(position: 'Accountant', company: 'Accountants Inc.')

Parameters:

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

    Instance initializer; keys MUST be strings

Options Hash (h):

  • 'position' (String)
  • 'company' (String)
  • 'start_date' (String)
  • 'end_date' (String)
  • 'summary' (String)
  • 'projects' (Array<Hash>)

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

See Also:



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/multiformatcv/job.rb', line 28

def initialize(h = {})
  @position = h['position']
  @company = h['company']
  @start_date = h['start_date']
  @end_date = h['end_date']
  @summary = h['summary']
  @projects = []

  if h['projects']
    h['projects'].each do |p|
      @projects << MultiformatCV::Project.new(p)
    end
  end
end

Instance Attribute Details

#companyObject

Returns the value of attribute company.



2
3
4
# File 'lib/multiformatcv/job.rb', line 2

def company
  @company
end

#end_dateObject

Returns the value of attribute end_date.



2
3
4
# File 'lib/multiformatcv/job.rb', line 2

def end_date
  @end_date
end

#positionObject

Returns the value of attribute position.



2
3
4
# File 'lib/multiformatcv/job.rb', line 2

def position
  @position
end

#projectsArray<MultiformatCV::Project>

List of projects that you worked on during this job

Returns:



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

def projects
  @projects
end

#start_dateObject

Returns the value of attribute start_date.



2
3
4
# File 'lib/multiformatcv/job.rb', line 2

def start_date
  @start_date
end

#summaryObject

Returns the value of attribute summary.



2
3
4
# File 'lib/multiformatcv/job.rb', line 2

def summary
  @summary
end