Class: Resume::Education

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

Overview

Represents a degree earned or other college-type educational experience

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#degreeObject

Returns the value of attribute degree.



227
228
229
# File 'lib/resume.rb', line 227

def degree
  @degree
end

#majorObject

Returns the value of attribute major.



229
230
231
# File 'lib/resume.rb', line 229

def major
  @major
end

#nameObject

Returns the value of attribute name.



226
227
228
# File 'lib/resume.rb', line 226

def name
  @name
end

#other_infoObject

Returns the value of attribute other_info.



230
231
232
# File 'lib/resume.rb', line 230

def other_info
  @other_info
end

#year_graduatedObject

Returns the value of attribute year_graduated.



228
229
230
# File 'lib/resume.rb', line 228

def year_graduated
  @year_graduated
end

Class Method Details

.scaffold(name = nil) ⇒ Object



232
233
234
235
236
237
238
239
240
241
# File 'lib/resume.rb', line 232

def Education.scaffold(name=nil)
    ed = Education.new
    ed.name = name
    ed.name = "Degree Mill U" if !name
    ed.degree = "Bachelor of Fine Arts"
    ed.year_graduated = 1969
    ed.major = "Underwater Basketweaving"
    ed.other_info = "Thesis: Basketweaving simplified"
    ed
end

Instance Method Details

#<=>(other_education) ⇒ Object



243
244
245
246
# File 'lib/resume.rb', line 243

def <=>(other_education)
    return 1 if !other_education
    return year_graduated <=> other_education.year_graduated
end