Class: Crunchbase::Degree
Constant Summary collapse
- RESOURCE_LIST =
'degrees'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#completed_on ⇒ Object
readonly
Returns the value of attribute completed_on.
-
#degree_subject ⇒ Object
readonly
Returns the value of attribute degree_subject.
-
#degree_type_name ⇒ Object
readonly
Returns the value of attribute degree_type_name.
-
#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.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
-
#initialize(json) ⇒ Degree
constructor
A new instance of Degree.
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_on ⇒ Object (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_subject ⇒ Object (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_name ⇒ Object (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_name ⇒ Object (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_path ⇒ Object (readonly)
Returns the value of attribute organization_path.
9 10 11 |
# File 'lib/crunchbase/degree.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/degree.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/degree.rb', line 9 def started_on @started_on end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
9 10 11 |
# File 'lib/crunchbase/degree.rb', line 9 def type_name @type_name end |