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.7.17 lib/fb_graph/education.rb
fb_graph-2.7.16 lib/fb_graph/education.rb
fb_graph-2.7.15 lib/fb_graph/education.rb
fb_graph-2.7.14 lib/fb_graph/education.rb
fb_graph-2.7.13 lib/fb_graph/education.rb
fb_graph-2.7.12 lib/fb_graph/education.rb
fb_graph-2.7.11 lib/fb_graph/education.rb
fb_graph-2.7.10 lib/fb_graph/education.rb
fb_graph-2.7.9 lib/fb_graph/education.rb
fb_graph-2.7.8 lib/fb_graph/education.rb
fb_graph-2.7.7 lib/fb_graph/education.rb
fb_graph-2.7.6 lib/fb_graph/education.rb
fb_graph-2.7.5 lib/fb_graph/education.rb
fb_graph-2.7.4 lib/fb_graph/education.rb
fb_graph-2.7.3 lib/fb_graph/education.rb
fb_graph-2.7.2 lib/fb_graph/education.rb
fb_graph-2.7.1 lib/fb_graph/education.rb
fb_graph-2.7.0 lib/fb_graph/education.rb
fb_graph-2.6.7 lib/fb_graph/education.rb
fb_graph-2.6.6 lib/fb_graph/education.rb