Sha256: bfa0c8e6032120440da3f3d2884bb468f7772950b43122f7e1247e141cab74c8

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

# encoding: utf-8

# http://api.crunchbase.com/v/2/organization/facebook/board_members_and_advisors

module Crunchbase
  class BoardMembersAndAdvisor < CBEntity
    
    RESOURCE_LIST = 'board_members_and_advisors'

    attr_reader :type_name, :name, :first_name, :last_name, :title, :started_on, :ended_on, 
                :path, :permalink, :created_at, :updated_at
    
    def initialize(json)
      @type_name    = json['type']
      @name         = json['first_name'].to_s + ' ' + json['last_name'].to_s
      @first_name   = json['first_name']
      @last_name    = json['last_name']
      @title        = json['title']
      @path         = json['path']
      @permalink    = (json['permalink'] || (json['path'] && json['path'].gsub('person/', '')))
      @started_on   = json['started_on'] && DateTime.parse(json['started_on'])
      @ended_on     = json['ended_on'] && DateTime.parse(json['ended_on'])
      @created_at   = Time.at(json['created_at']).utc
      @updated_at   = Time.at(json['updated_at']).utc
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
crunchbase_v2-0.0.9 lib/crunchbase/board_members_and_advisor.rb
crunchbase_v2-0.0.8 lib/crunchbase/board_members_and_advisor.rb
crunchbase_v2-0.0.7 lib/crunchbase/board_members_and_advisor.rb