Class: CrunchbaseAcademic::Organization
- Defined in:
- lib/crunchbase_academic/organization.rb
Constant Summary collapse
- OBJECT_NAME =
'organization'
Instance Attribute Summary collapse
-
#founded_on ⇒ Object
readonly
Returns the value of attribute founded_on.
-
#founded_on_year ⇒ Object
readonly
Returns the value of attribute founded_on_year.
-
#funding_rounds ⇒ Object
readonly
Returns the value of attribute funding_rounds.
-
#news ⇒ Object
readonly
Returns the value of attribute news.
-
#products ⇒ Object
readonly
Returns the value of attribute products.
-
#total_funding_usd ⇒ Object
readonly
Returns the value of attribute total_funding_usd.
Instance Method Summary collapse
-
#initialize(json) ⇒ Organization
constructor
A new instance of Organization.
Methods inherited from Common
Constructor Details
#initialize(json) ⇒ Organization
Returns a new instance of Organization.
6 7 8 9 10 11 12 13 |
# File 'lib/crunchbase_academic/organization.rb', line 6 def initialize(json) @founded_on ||= json['data']['properties']['founded_on'] @founded_on_year ||= json['data']['properties']['founded_on_year'] @total_funding_usd ||= json['data']['properties']['total_funding_usd'] @products ||= json['data']['relationships']['products'] @news ||= json['data']['relationships']['news'] @funding_rounds ||= json['data']['relationships']['funding_rounds'] end |
Instance Attribute Details
#founded_on ⇒ Object (readonly)
Returns the value of attribute founded_on.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def founded_on @founded_on end |
#founded_on_year ⇒ Object (readonly)
Returns the value of attribute founded_on_year.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def founded_on_year @founded_on_year end |
#funding_rounds ⇒ Object (readonly)
Returns the value of attribute funding_rounds.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def funding_rounds @funding_rounds end |
#news ⇒ Object (readonly)
Returns the value of attribute news.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def news @news end |
#products ⇒ Object (readonly)
Returns the value of attribute products.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def products @products end |
#total_funding_usd ⇒ Object (readonly)
Returns the value of attribute total_funding_usd.
4 5 6 |
# File 'lib/crunchbase_academic/organization.rb', line 4 def total_funding_usd @total_funding_usd end |