Sha256: e96cf7db4c5de7b4ff2b3c3ba48fbcde4bf8efd319e10159689383ede7144c77
Contents?: true
Size: 855 Bytes
Versions: 3
Compression:
Stored size: 855 Bytes
Contents
# encoding: utf-8 # http://api.crunchbase.com/v/2/organization/facebook/competitors module Crunchbase class Competitor < CBEntity RESOURCE_LIST = 'competitors' attr_reader :type_name, :name, :last_name, :path, :permalink, :title, :started_on, :ended_on, :created_at, :updated_at def initialize(json) @type_name = json['type'] @name = (json['name'] || (json['first_name'].to_s + ' ' + json['last_name'].to_s)) @path = json['path'] @permalink = (json['permalink'] || (json['path'] && json['path'].gsub('organization/', ''))) @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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
crunchbase_v2-0.0.9 | lib/crunchbase/competitor.rb |
crunchbase_v2-0.0.8 | lib/crunchbase/competitor.rb |
crunchbase_v2-0.0.7 | lib/crunchbase/competitor.rb |