Sha256: b23608907acc7c66e9f36bf9f261063cf3ed3762b754322c3314d20ff4ce2d6d

Contents?: true

Size: 917 Bytes

Versions: 2

Compression:

Stored size: 917 Bytes

Contents

# encoding: utf-8

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

module Crunchbase
  class CurrentTeam < CBEntity
    RESOURCE_LIST = 'current_team'

    attr_reader :type_name, :name, :first_name, :last_name, :path, :permalink, :title,
                :started_on, :ended_on, :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']
      @path         = json['path']
      @permalink    = (json['permalink'] || (json['path'] && json['path'].gsub('person/', '')))
      @title        = json['title']
      @started_on   = json['started_on']
      @ended_on     = 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

2 entries across 2 versions & 1 rubygems

Version Path
crunchbase_v2-0.0.6 lib/crunchbase/current_team.rb
crunchbase_v2-0.0.5 lib/crunchbase/current_team.rb