Class: FbGraph::Education

Inherits:
Object
  • Object
show all
Includes:
Comparison
Defined in:
lib/fb_graph/education.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Comparison

#==

Constructor Details

- (Education) initialize(attributes = {})

Returns a new instance of Education



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/fb_graph/education.rb', line 7

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

Instance Attribute Details

- (Object) classes

Returns the value of attribute classes



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def classes
  @classes
end

- (Object) concentration

Returns the value of attribute concentration



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def concentration
  @concentration
end

- (Object) degree

Returns the value of attribute degree



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def degree
  @degree
end

- (Object) school

Returns the value of attribute school



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def school
  @school
end

- (Object) type

Returns the value of attribute type



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def type
  @type
end

- (Object) year

Returns the value of attribute year



5
6
7
# File 'lib/fb_graph/education.rb', line 5

def year
  @year
end