Class: CrunchbaseAcademic::Organization

Inherits:
Common
  • Object
show all
Defined in:
lib/crunchbase_academic/organization.rb

Constant Summary collapse

OBJECT_NAME =
'organization'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Common

get

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_onObject (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_yearObject (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_roundsObject (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

#newsObject (readonly)

Returns the value of attribute news.



4
5
6
# File 'lib/crunchbase_academic/organization.rb', line 4

def news
  @news
end

#productsObject (readonly)

Returns the value of attribute products.



4
5
6
# File 'lib/crunchbase_academic/organization.rb', line 4

def products
  @products
end

#total_funding_usdObject (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