Class: Resume::Position
- Inherits:
-
Object
- Object
- Resume::Position
- Defined in:
- lib/resume.rb
Overview
A position held within a job
Instance Attribute Summary collapse
-
#achievements ⇒ Object
Array of achievements.
-
#date_range ⇒ Object
Returns the value of attribute date_range.
-
#description ⇒ Object
Description of the position’s requirements.
-
#title ⇒ Object
Job title.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other_position) ⇒ Object
-
#initialize ⇒ Position
constructor
A new instance of Position.
Constructor Details
#initialize ⇒ Position
Returns a new instance of Position.
330 331 332 |
# File 'lib/resume.rb', line 330 def initialize @achievements = Array.new end |
Instance Attribute Details
#achievements ⇒ Object
Array of achievements
328 329 330 |
# File 'lib/resume.rb', line 328 def achievements @achievements end |
#date_range ⇒ Object
Returns the value of attribute date_range.
324 325 326 |
# File 'lib/resume.rb', line 324 def date_range @date_range end |
#description ⇒ Object
Description of the position’s requirements
326 327 328 |
# File 'lib/resume.rb', line 326 def description @description end |
#title ⇒ Object
Job title
323 324 325 |
# File 'lib/resume.rb', line 323 def title @title end |
Class Method Details
.scaffold(name, year) ⇒ Object
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/resume.rb', line 334 def Position.scaffold(name,year) position = Position.new position.title = name #position.date_range = DateRange.new #position.date_range.start_date = Date.civil(year,01,01); #position.date_range.end_date = Date.civil(year,12,01); position.description = "Enter in a description of the position you held" position.achievements << "Enter your most important achievements first" position.achievements << "Follow with additional ones, making sure to indicate the result of your actions" position.achievements[0]. = Array.new position.achievements[0]. << :major position.achievements[0]. << :architect position.achievements[1]. = Array.new position.achievements[1]. << :architect position end |
Instance Method Details
#<=>(other_position) ⇒ Object
351 352 353 354 355 |
# File 'lib/resume.rb', line 351 def <=>(other_position) return 1 if !other_position return 1 if !other_position.date_range return date_range <=> other_position.date_range end |