Class: Resume::Position

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

Overview

A position held within a job

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePosition

Returns a new instance of Position.



330
331
332
# File 'lib/resume.rb', line 330

def initialize
    @achievements = Array.new
end

Instance Attribute Details

#achievementsObject

Array of achievements



328
329
330
# File 'lib/resume.rb', line 328

def achievements
  @achievements
end

#date_rangeObject

Returns the value of attribute date_range.



324
325
326
# File 'lib/resume.rb', line 324

def date_range
  @date_range
end

#descriptionObject

Description of the position’s requirements



326
327
328
# File 'lib/resume.rb', line 326

def description
  @description
end

#titleObject

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].tags = Array.new
    position.achievements[0].tags << :major
    position.achievements[0].tags << :architect
    position.achievements[1].tags = Array.new
    position.achievements[1].tags << :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