Method: Crunchbase::OrganizationInvestor#initialize
- Defined in:
- lib/crunchbase/organization_investor.rb
#initialize(hash) ⇒ OrganizationInvestor
Returns a new instance of OrganizationInvestor.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/crunchbase/organization_investor.rb', line 8 def initialize(hash) @type_name = hash["type"] if hash["type"] == 'Organization' @type = Organization @name = hash["name"] else @type = Person @name = [hash["first_name"], hash["last_name"]].compact.join(' ') @first_name = hash["first_name"] @last_name = hash["last_name"] end @path = hash["path"] @permalink = hash["path"] && hash["path"].split('/').last end |