Class: Crunchbase::Model::Job

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

Constant Summary collapse

RESOURCE_LIST =
'jobs'

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



13
14
15
16
17
18
19
20
# File 'lib/crunchbase/model/job.rb', line 13

def initialize(json)
  super

  unless (relationships = json['relationships']).nil?
    instance_relationships_object(Crunchbase::Model::Person, 'person', relationships['person'])
    instance_relationships_object(Crunchbase::Model::Organization, 'organization', relationships['organization'])
  end
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def created_at
  @created_at
end

#ended_onObject (readonly)

Returns the value of attribute ended_on.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def ended_on
  @ended_on
end

#ended_on_trust_codeObject (readonly)

Returns the value of attribute ended_on_trust_code.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def ended_on_trust_code
  @ended_on_trust_code
end

#organizationObject (readonly)

Returns the value of attribute organization.



11
12
13
# File 'lib/crunchbase/model/job.rb', line 11

def organization
  @organization
end

#personObject (readonly)

Returns the value of attribute person.



11
12
13
# File 'lib/crunchbase/model/job.rb', line 11

def person
  @person
end

#started_onObject (readonly)

Returns the value of attribute started_on.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def started_on
  @started_on
end

#started_on_trust_codeObject (readonly)

Returns the value of attribute started_on_trust_code.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def started_on_trust_code
  @started_on_trust_code
end

#titleObject (readonly)

Returns the value of attribute title.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def title
  @title
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/crunchbase/model/job.rb', line 8

def updated_at
  @updated_at
end

Instance Method Details

#date_keysObject



28
29
30
# File 'lib/crunchbase/model/job.rb', line 28

def date_keys
  %w[ started_on ended_on ]
end

#property_keysObject



22
23
24
25
26
# File 'lib/crunchbase/model/job.rb', line 22

def property_keys
  %w[
    title started_on started_on_trust_code ended_on ended_on_trust_code created_at updated_at
  ]
end