Class: Crunchbase::Degree

Inherits:
CBEntity show all
Defined in:
lib/crunchbase/degree.rb

Constant Summary collapse

RESOURCE_LIST =
'degrees'

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

Returns a new instance of Degree.



12
13
14
15
16
17
18
19
20
21
# File 'lib/crunchbase/degree.rb', line 12

def initialize(json)
  @type_name              = json['type']
  @organization_name      = json['organization_name']
  @organization_permalink = (json['organization_path'] && json['organization_path'].gsub('organization/', '') || nil)
  @organization_path      = json['organization_path']
  @degree_type_name       = json['degree_type_name']
  @degree_subject         = json['degree_subject']
  @started_on             = (json['started_on'] && json['started_on'].to_datetime.utc || nil)
  @completed_on           = (json['completed_on'] && json['completed_on'].to_datetime.utc || nil)
end

Instance Attribute Details

#completed_onObject (readonly)

Returns the value of attribute completed_on.



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

def completed_on
  @completed_on
end

#degree_subjectObject (readonly)

Returns the value of attribute degree_subject.



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

def degree_subject
  @degree_subject
end

#degree_type_nameObject (readonly)

Returns the value of attribute degree_type_name.



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

def degree_type_name
  @degree_type_name
end

#organization_nameObject (readonly)

Returns the value of attribute organization_name.



9
10
11
# File 'lib/crunchbase/degree.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/degree.rb', line 9

def organization_path
  @organization_path
end

Returns the value of attribute organization_permalink.



9
10
11
# File 'lib/crunchbase/degree.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/degree.rb', line 9

def started_on
  @started_on
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



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

def type_name
  @type_name
end