Class: FbGraph::Education
- Inherits:
-
Object
- Object
- FbGraph::Education
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/education.rb
Instance Attribute Summary collapse
-
#classes ⇒ Object
Returns the value of attribute classes.
-
#concentration ⇒ Object
Returns the value of attribute concentration.
-
#degree ⇒ Object
Returns the value of attribute degree.
-
#school ⇒ Object
Returns the value of attribute school.
-
#type ⇒ Object
Returns the value of attribute type.
-
#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 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.delete(:id), school) end if (degree = attributes[:degree]) @degree = Page.new(degree.delete(:id), degree) end if (year = attributes[:year]) @year = Page.new(year.delete(:id), year) end @concentration = [] if attributes[:concentration] attributes[:concentration].each do |concentration| @concentration << Page.new(concentration.delete(:id), concentration) end end @classes = [] if attributes[:classes] attributes[:classes].each do |klass| @classes << Page.new(klass.delete(:id), klass) end end @type = attributes[:type] end |
Instance Attribute Details
#classes ⇒ Object
Returns the value of attribute classes.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def classes @classes end |
#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 |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def type @type end |
#year ⇒ Object
Returns the value of attribute year.
5 6 7 |
# File 'lib/fb_graph/education.rb', line 5 def year @year end |