Class: MultiformatCV::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h = {}) ⇒ Project

Create Project instance

Example:

project = MultiformatCV::Project.new(name: 'Life Solver (TM)', summary: '...', ...)

Parameters:

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

    Instance initializer; keys MUST be strings

Options Hash (h):

  • 'name' (String)
  • 'position' (String)
  • 'start_date' (String)
  • 'end_date' (String)
  • 'repo' (String)

    Repository URL

  • 'url' (String)

    URL for the project

  • 'summary' (String)

    Project description, goals, etc.

  • 'tasks' (Array<String>)

    Tasks done for the project

  • 'technologies' (Array<String>)

    Technologies used in the project



32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/multiformatcv/project.rb', line 32

def initialize(h = {})
  @name = h['name']
  @position = h['position']
  @start_date = h['start_date']
  @end_date = h['end_date']
  @repo = h['repo']
  @summary = h['summary']
  @url = h['url']
  @tasks = []
  @technologies = []

  h['tasks'].each { |t| @tasks << t } if h['tasks']
  h['technologies'].each { |t| @technologies << t } if h['technologies']
end

Instance Attribute Details

#end_dateObject

Returns the value of attribute end_date.



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

def end_date
  @end_date
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#positionObject

Returns the value of attribute position.



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

def position
  @position
end

#repoObject

Repository URL for the project



11
12
13
# File 'lib/multiformatcv/project.rb', line 11

def repo
  @repo
end

#start_dateObject

Returns the value of attribute start_date.



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

def start_date
  @start_date
end

#summaryObject

Returns the value of attribute summary.



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

def summary
  @summary
end

#tasksObject

Returns the value of attribute tasks.



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

def tasks
  @tasks
end

#technologiesObject

Returns the value of attribute technologies.



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

def technologies
  @technologies
end

#urlObject

Page or site URL for the project



14
15
16
# File 'lib/multiformatcv/project.rb', line 14

def url
  @url
end