Sha256: 7c1fe44f0065757f09a2c545c492d3cce2a55bfbad12ed297e9076a40eea3224

Contents?: true

Size: 741 Bytes

Versions: 21

Compression:

Stored size: 741 Bytes

Contents

module FbGraph
  class Education
    include FbGraph::Comparison

    attr_accessor :school, :degree, :year, :concentration

    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
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
fb_graph-1.0.1 lib/fb_graph/education.rb
fb_graph-1.0.0 lib/fb_graph/education.rb
fb_graph-0.8.0 lib/fb_graph/education.rb
fb_graph-0.7.3 lib/fb_graph/education.rb
fb_graph-0.7.2 lib/fb_graph/education.rb
fb_graph-0.7.1 lib/fb_graph/education.rb
fb_graph-0.7.0 lib/fb_graph/education.rb
fb_graph-0.6.0 lib/fb_graph/education.rb
fb_graph-0.5.0 lib/fb_graph/education.rb
fb_graph-0.4.2 lib/fb_graph/education.rb
fb_graph-0.4.1 lib/fb_graph/education.rb
fb_graph-0.4.0 lib/fb_graph/education.rb
fb_graph-0.3.0 lib/fb_graph/education.rb
fb_graph-0.2.2 lib/fb_graph/education.rb
fb_graph-0.2.1 lib/fb_graph/education.rb
fb_graph-0.2.0 lib/fb_graph/education.rb
fb_graph-0.1.3 lib/fb_graph/education.rb
fb_graph-0.1.2 lib/fb_graph/education.rb
fb_graph-0.1.1 lib/fb_graph/education.rb
fb_graph-0.1.0 lib/fb_graph/education.rb