Class: Crunchbase::OrganizationInvestor
- Defined in:
- lib/crunchbase/organization_investor.rb
Constant Summary
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
-
#initialize(hash) ⇒ OrganizationInvestor
constructor
A new instance of OrganizationInvestor.
Methods inherited from CBEntity
array_from_list, category_lists_by_permalink, #fetch, get, list, lists_for_permalink, lists_for_person_permalink, parsing_from_list, search, total_items_from_list
Constructor Details
#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 |
Instance Attribute Details
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def last_name @last_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def path @path end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def permalink @permalink end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def type @type end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
6 7 8 |
# File 'lib/crunchbase/organization_investor.rb', line 6 def type_name @type_name end |