Class: FbGraph::Education
- Inherits:
-
Object
- Object
- FbGraph::Education
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/education.rb
Instance Attribute Summary collapse
-
#concentration ⇒ Object
Returns the value of attribute concentration.
-
#degree ⇒ Object
Returns the value of attribute degree.
-
#school ⇒ Object
Returns the value of attribute school.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Education
constructor
A new instance of Education.
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
#concentration ⇒ Object
Returns the value of attribute concentration.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def concentration @concentration end |
#degree ⇒ Object
Returns the value of attribute degree.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def degree @degree end |
#school ⇒ Object
Returns the value of attribute school.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def school @school end |
#year ⇒ Object
Returns the value of attribute year.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def year @year end |