Class: Crunchbase::PrimaryAffiliation
- Defined in:
- lib/crunchbase/primary_affiliation.rb
Constant Summary collapse
- RESOURCE_LIST =
'primary_affiliation'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#ended_on ⇒ Object
readonly
Returns the value of attribute ended_on.
-
#organization_name ⇒ Object
readonly
Returns the value of attribute organization_name.
-
#organization_path ⇒ Object
readonly
Returns the value of attribute organization_path.
-
#organization_permalink ⇒ Object
readonly
Returns the value of attribute organization_permalink.
-
#started_on ⇒ Object
readonly
Returns the value of attribute started_on.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(json) ⇒ PrimaryAffiliation
constructor
A new instance of PrimaryAffiliation.
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(json) ⇒ PrimaryAffiliation
Returns a new instance of PrimaryAffiliation.
11 12 13 14 15 16 17 18 |
# File 'lib/crunchbase/primary_affiliation.rb', line 11 def initialize(json) @organization_name = json['organization_name'] @organization_permalink = (json['organization_path'] && json['organization_path'].gsub('organization/', '') || nil) @organization_path = json['organization_path'] @title = json['title'] @started_on = (json['started_on'] && json['started_on'].to_datetime.utc || nil) @ended_on = (json['ended_on'] && json['ended_on'].to_datetime.utc || nil) end |
Instance Attribute Details
#ended_on ⇒ Object (readonly)
Returns the value of attribute ended_on.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def ended_on @ended_on end |
#organization_name ⇒ Object (readonly)
Returns the value of attribute organization_name.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def organization_name @organization_name end |
#organization_path ⇒ Object (readonly)
Returns the value of attribute organization_path.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def organization_path @organization_path end |
#organization_permalink ⇒ Object (readonly)
Returns the value of attribute organization_permalink.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def organization_permalink @organization_permalink end |
#started_on ⇒ Object (readonly)
Returns the value of attribute started_on.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def started_on @started_on end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
9 10 11 |
# File 'lib/crunchbase/primary_affiliation.rb', line 9 def title @title end |