Sha256: 1505a6c17c0878ba7ba9b7dad1f745277eba3bf7153b6872a02829da306d2a6c

Contents?: true

Size: 885 Bytes

Versions: 101

Compression:

Stored size: 885 Bytes

Contents

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

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
fb_graph-2.6.5 lib/fb_graph/education.rb
fb_graph-2.6.4 lib/fb_graph/education.rb
fb_graph-2.6.3 lib/fb_graph/education.rb
fb_graph-2.6.2 lib/fb_graph/education.rb
fb_graph-2.6.1 lib/fb_graph/education.rb
fb_graph-2.6.0 lib/fb_graph/education.rb
fb_graph-2.5.9 lib/fb_graph/education.rb
fb_graph-2.5.8 lib/fb_graph/education.rb
fb_graph-2.5.7 lib/fb_graph/education.rb
fb_graph-2.5.6 lib/fb_graph/education.rb
fb_graph-2.5.5 lib/fb_graph/education.rb
fb_graph-2.5.4 lib/fb_graph/education.rb
fb_graph-2.5.3 lib/fb_graph/education.rb
fb_graph-2.5.2 lib/fb_graph/education.rb
fb_graph-2.5.1 lib/fb_graph/education.rb
fb_graph-2.5.0 lib/fb_graph/education.rb
fb_graph-2.4.20 lib/fb_graph/education.rb
fb_graph-2.4.19 lib/fb_graph/education.rb
fb_graph-2.4.18 lib/fb_graph/education.rb
fb_graph-2.4.17 lib/fb_graph/education.rb