Class: Crunchbase::Experience

Inherits:
CBEntity
  • Object
show all
Defined in:
lib/crunchbase/experience.rb

Constant Summary collapse

RESOURCE_LIST =
'experience'

Constants inherited from CBEntity

CBEntity::RELATIONSHIPS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ Experience

Returns a new instance of Experience.



11
12
13
14
15
16
17
18
# File 'lib/crunchbase/experience.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_onObject (readonly)

Returns the value of attribute ended_on.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def ended_on
  @ended_on
end

#organization_nameObject (readonly)

Returns the value of attribute organization_name.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def organization_name
  @organization_name
end

#organization_pathObject (readonly)

Returns the value of attribute organization_path.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def organization_path
  @organization_path
end

Returns the value of attribute organization_permalink.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def organization_permalink
  @organization_permalink
end

#started_onObject (readonly)

Returns the value of attribute started_on.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def started_on
  @started_on
end

#titleObject (readonly)

Returns the value of attribute title.



9
10
11
# File 'lib/crunchbase/experience.rb', line 9

def title
  @title
end