Class: Spear::Structure::Job::Retrieve

Inherits:
Base
  • Object
show all
Defined in:
lib/spear/structure/job/retrieve.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#error_message, #response, #root, #status

Instance Method Summary collapse

Methods inherited from Base

#success?

Constructor Details

#initialize(response) ⇒ Retrieve

Returns a new instance of Retrieve.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/spear/structure/job/retrieve.rb', line 8

def initialize(response)
  super(response)

  if response.class == HTTParty::Response
    @job_did = response.request.options[:query][:DID]
  end

  unless @root["Job"].nil?
    @job_title = @root["Job"]["JobTitle"]
    @job_description = @root["Job"]["JobDescription"]
    @job_requirements = @root["Job"]["JobRequirements"]
    @experience_required = @root["Job"]["ExperienceRequired"]
    @job_categories = @root["Job"]["Categories"]
  end
end

Instance Attribute Details

#job_categoriesObject

Returns the value of attribute job_categories.



6
7
8
# File 'lib/spear/structure/job/retrieve.rb', line 6

def job_categories
  @job_categories
end

#job_descriptionObject

Returns the value of attribute job_description.



6
7
8
# File 'lib/spear/structure/job/retrieve.rb', line 6

def job_description
  @job_description
end

#job_didObject (readonly)

Returns the value of attribute job_did.



5
6
7
# File 'lib/spear/structure/job/retrieve.rb', line 5

def job_did
  @job_did
end

#job_requirementsObject

Returns the value of attribute job_requirements.



6
7
8
# File 'lib/spear/structure/job/retrieve.rb', line 6

def job_requirements
  @job_requirements
end

#job_titleObject

Returns the value of attribute job_title.



6
7
8
# File 'lib/spear/structure/job/retrieve.rb', line 6

def job_title
  @job_title
end

#required_experienceObject

Returns the value of attribute required_experience.



6
7
8
# File 'lib/spear/structure/job/retrieve.rb', line 6

def required_experience
  @required_experience
end