Class: Crunchbase::PastTeam
- Defined in:
- lib/crunchbase/past_team.rb
Constant Summary collapse
- RESOURCE_LIST =
'past_team'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#ended_on ⇒ Object
readonly
Returns the value of attribute ended_on.
-
#ended_on_trust_code ⇒ Object
readonly
Returns the value of attribute ended_on_trust_code.
-
#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.
-
#started_on ⇒ Object
readonly
Returns the value of attribute started_on.
-
#started_on_trust_code ⇒ Object
readonly
Returns the value of attribute started_on_trust_code.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ PastTeam
constructor
A new instance of PastTeam.
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) ⇒ PastTeam
Returns a new instance of PastTeam.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/crunchbase/past_team.rb', line 16 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'] && DateTime.parse(json['started_on']) @ended_on = json['ended_on'] && DateTime.parse(json['ended_on']) @created_at = Time.at(json['created_at']).utc @updated_at = Time.at(json['updated_at']).utc @started_on_trust_code = json['started_on_trust_code'] @ended_on_trust_code = json['ended_on_trust_code'] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def created_at @created_at end |
#ended_on ⇒ Object (readonly)
Returns the value of attribute ended_on.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def ended_on @ended_on end |
#ended_on_trust_code ⇒ Object (readonly)
Returns the value of attribute ended_on_trust_code.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def ended_on_trust_code @ended_on_trust_code end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def last_name @last_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def path @path end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def permalink @permalink end |
#started_on ⇒ Object (readonly)
Returns the value of attribute started_on.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def started_on @started_on end |
#started_on_trust_code ⇒ Object (readonly)
Returns the value of attribute started_on_trust_code.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def started_on_trust_code @started_on_trust_code end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def title @title end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def type_name @type_name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
12 13 14 |
# File 'lib/crunchbase/past_team.rb', line 12 def updated_at @updated_at end |