Class: Crunchbase::Model::OwnedBy

Inherits:
Entity
  • Object
show all
Defined in:
lib/crunchbase/model/owned_by.rb

Instance Attribute Summary collapse

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

Methods inherited from Entity

array_from_list, #fetch, funding_rounds_lists, get, list, organization_lists, parsing_from_list, person_lists, total_items_from_list

Constructor Details

#initialize(json) ⇒ OwnedBy

Returns a new instance of OwnedBy.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/crunchbase/model/owned_by.rb', line 8

def initialize(json)
  instance_variable_set("@type_name",  json['type'] || nil)

  property_keys.each { |v| 
    instance_variable_set("@#{v}", json[v] || nil) 
  }

  %w[created_at updated_at].each { |v| 
    instance_variable_set("@#{v}", Time.at(json[v])) 
  }
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



6
7
8
# File 'lib/crunchbase/model/owned_by.rb', line 6

def created_at
  @created_at
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/crunchbase/model/owned_by.rb', line 6

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/crunchbase/model/owned_by.rb', line 6

def path
  @path
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/crunchbase/model/owned_by.rb', line 6

def updated_at
  @updated_at
end

Instance Method Details

#property_keysObject



20
21
22
23
24
# File 'lib/crunchbase/model/owned_by.rb', line 20

def property_keys
  %w[
    name path created_at updated_at
  ]
end