Sha256: 47094a222d7acade14f0ab1f46348087c164c17a0a703f593b087e3156aa2243

Contents?: true

Size: 985 Bytes

Versions: 8

Compression:

Stored size: 985 Bytes

Contents

# encoding: utf-8

# https://api.crunchbase.com/v/2/person/#{permalink}/degrees?user_key=key

module Crunchbase
  class Degree < CBEntity
    RESOURCE_LIST = 'degrees'
    
    attr_reader :started_on, :completed_on, :degree_type_name, :degree_subject, 
                :type_name, :organization_name, :organization_path, :organization_permalink

    def initialize(json)
      @type_name              = json['type']
      @organization_name      = json['organization_name']
      @organization_permalink = (json['organization_path'] && json['organization_path'].gsub('organization/', '') || nil)
      @organization_path      = json['organization_path']
      @degree_type_name       = json['degree_type_name']
      @degree_subject         = json['degree_subject']
      @started_on             = (json['started_on'] && json['started_on'].to_datetime.utc || nil)
      @completed_on           = (json['completed_on'] && json['completed_on'].to_datetime.utc || nil)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
crunchbase_v2-1.1.6 lib/crunchbase/degree.rb
crunchbase_v2-1.1.5 lib/crunchbase/degree.rb
crunchbase_v2-1.1.4 lib/crunchbase/degree.rb
crunchbase_v2-1.1.3 lib/crunchbase/degree.rb
crunchbase_v2-1.1.2 lib/crunchbase/degree.rb
crunchbase_v2-1.1.1 lib/crunchbase/degree.rb
crunchbase_v2-1.1.0 lib/crunchbase/degree.rb
crunchbase_v2-1.0.0 lib/crunchbase/degree.rb