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

#initialize(attributes = {}) ⇒ Education

Returns a new instance of Education.



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

def initialize(attributes = {})
  if (school = attributes[:school])
    @school = FbGraph::Page.new(school.delete(:id), school)
  end
  if (degree = attributes[:degree])
    @degree = FbGraph::Page.new(degree.delete(:id), degree)
  end
  if (year = attributes[:year])
    @year = FbGraph::Page.new(year.delete(:id), year)
  end
  @concentration = []
  if attributes[:concentration]
    attributes[:concentration].each do |concentration|
      @concentration << FbGraph::Page.new(concentration.delete(:id), concentration)
    end
  end
end

Instance Attribute Details

#concentrationObject

Returns the value of attribute concentration.



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

def concentration
  @concentration
end

#degreeObject

Returns the value of attribute degree.



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

def degree
  @degree
end

#schoolObject

Returns the value of attribute school.



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

def school
  @school
end

#yearObject

Returns the value of attribute year.



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

def year
  @year
end