Class: Spear::Structure::Resume::Retrieve

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

Instance Attribute Summary collapse

Attributes inherited from Base

#error_message, #response, #root, #status

Instance Method Summary collapse

Methods included from EmbededClass

#generate_educations, #generate_experiences

Methods inherited from Base

#success?

Constructor Details

#initialize(response) ⇒ Retrieve

Returns a new instance of Retrieve.



9
10
11
12
13
14
15
16
17
# File 'lib/spear/structure/resume/retrieve.rb', line 9

def initialize(response)
  super(response)

  @resume = @root['Resume']
  @title = @resume['Title']
  @total_years_experience = @resume['TotalYearsExperience'].to_i rescue 0
  @educations = generate_educations(@resume['Educations']) rescue nil
  @company_experiences = generate_experiences(@resume['CompanyExperiences']) rescue nil
end

Instance Attribute Details

#company_experiencesObject

Returns the value of attribute company_experiences.



7
8
9
# File 'lib/spear/structure/resume/retrieve.rb', line 7

def company_experiences
  @company_experiences
end

#educationsObject

Returns the value of attribute educations.



7
8
9
# File 'lib/spear/structure/resume/retrieve.rb', line 7

def educations
  @educations
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/spear/structure/resume/retrieve.rb', line 7

def title
  @title
end

#total_years_experienceObject

Returns the value of attribute total_years_experience.



7
8
9
# File 'lib/spear/structure/resume/retrieve.rb', line 7

def total_years_experience
  @total_years_experience
end