Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (30 sloc) 0.885 kB
module FbGraph
class Education
include Comparison
attr_accessor :school, :degree, :year, :concentration, :classes, :type
def initialize(attributes = {})
if (school = attributes[:school])
@school = Page.new(school[:id], school)
end
if (degree = attributes[:degree])
@degree = Page.new(degree[:id], degree)
end
if (year = attributes[:year])
@year = Page.new(year[:id], year)
end
@concentration = []
if attributes[:concentration]
attributes[:concentration].each do |concentration|
@concentration << Page.new(concentration[:id], concentration)
end
end
@classes = []
if attributes[:classes]
attributes[:classes].each do |klass|
@classes << Klass.new(klass[:id], klass)
end
end
@type = attributes[:type]
end
end
end
Jump to Line
Something went wrong with that request. Please try again.