Class: MultiformatCV::Project
- Inherits:
-
Object
- Object
- MultiformatCV::Project
- Defined in:
- lib/multiformatcv/project.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
-
#repo ⇒ Object
Repository URL for the project.
-
#skills ⇒ Object
Returns the value of attribute skills.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
-
#url ⇒ Object
Page or site URL for the project.
Instance Method Summary collapse
-
#end_date ⇒ DateTime
Date or nil.
-
#initialize(h = {}) ⇒ Project
constructor
Create Project instance.
-
#start_date ⇒ DateTime
Date or nil.
Constructor Details
#initialize(h = {}) ⇒ Project
Create Project instance
Example:
project = MultiformatCV::Project.new(name: 'Life Solver (TM)', summary: '...', ...)
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/multiformatcv/project.rb', line 30 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 = [] @skills = [] h['tasks'].each { |t| @tasks << t } if h['tasks'] h['skills'].each { |t| @skills << t } if h['skills'] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/multiformatcv/project.rb', line 2 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
2 3 4 |
# File 'lib/multiformatcv/project.rb', line 2 def position @position end |
#repo ⇒ Object
Repository URL for the project
9 10 11 |
# File 'lib/multiformatcv/project.rb', line 9 def repo @repo end |
#skills ⇒ Object
Returns the value of attribute skills.
2 3 4 |
# File 'lib/multiformatcv/project.rb', line 2 def skills @skills end |
#summary ⇒ Object
Returns the value of attribute summary.
2 3 4 |
# File 'lib/multiformatcv/project.rb', line 2 def summary @summary end |
#tasks ⇒ Object
Returns the value of attribute tasks.
2 3 4 |
# File 'lib/multiformatcv/project.rb', line 2 def tasks @tasks end |
#url ⇒ Object
Page or site URL for the project
12 13 14 |
# File 'lib/multiformatcv/project.rb', line 12 def url @url end |
Instance Method Details
#end_date ⇒ DateTime
Returns Date or nil.
46 47 48 49 50 51 |
# File 'lib/multiformatcv/project.rb', line 46 def end_date if @end_date and @end_date != '' return DateTime.parse(@end_date) end return nil end |
#start_date ⇒ DateTime
Returns Date or nil.
54 55 56 57 58 59 |
# File 'lib/multiformatcv/project.rb', line 54 def start_date if @start_date and @start_date != '' return DateTime.parse(@start_date) end return nil end |