Class: Sovren::Resume

Inherits:
Object
  • Object
show all
Defined in:
lib/sovren/resume.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#achievementsObject

Returns the value of attribute achievements.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def achievements
  @achievements
end

#associationsObject

Returns the value of attribute associations.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def associations
  @associations
end

#certificationsObject

Returns the value of attribute certifications.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def certifications
  @certifications
end

#competenciesObject

Returns the value of attribute competencies.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def competencies
  @competencies
end

#contact_informationObject

Returns the value of attribute contact_information.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def contact_information
  @contact_information
end

#education_historyObject

Returns the value of attribute education_history.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def education_history
  @education_history
end

#employment_historyObject

Returns the value of attribute employment_history.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def employment_history
  @employment_history
end

#executive_summaryObject

Returns the value of attribute executive_summary.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def executive_summary
  @executive_summary
end

#languagesObject

Returns the value of attribute languages.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def languages
  @languages
end

#military_historyObject

Returns the value of attribute military_history.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def military_history
  @military_history
end

#objectiveObject

Returns the value of attribute objective.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def objective
  @objective
end

#patent_historyObject

Returns the value of attribute patent_history.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def patent_history
  @patent_history
end

#publication_historyObject

Returns the value of attribute publication_history.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def publication_history
  @publication_history
end

#referencesObject

Returns the value of attribute references.



5
6
7
# File 'lib/sovren/resume.rb', line 5

def references
  @references
end

Class Method Details

.parse(resume) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/sovren/resume.rb', line 7

def self.parse(resume)
  parsed_resume = Nokogiri::XML.parse(resume)
  resume = self.new
  resume.executive_summary = parsed_resume.css('ExecutiveSummary').text
  resume.objective = parsed_resume.css('Objective').text
  resume.contact_information = ContactInformation.parse(parsed_resume.css('ContactInfo').first)
  resume.education_history = Education.parse(parsed_resume.css('EducationHistory').first)
  resume.employment_history = Employment.parse(parsed_resume.css('EmploymentHistory').first)
  resume.certifications = Certification.parse(parsed_resume.css('LicensesAndCertifications').first)
  resume.competencies = Competency.parse(parsed_resume.css('Qualifications').first)
  resume.achievements = Achievement.parse(parsed_resume.css('Achievements').first)
  resume.associations = Association.parse(parsed_resume.css('Associations').first)
  resume.languages = Language.parse(parsed_resume.css('Languages').first)
  resume.military_history = Military.parse(parsed_resume.css('MilitaryHistory').first)
  resume.patent_history = Patent.parse(parsed_resume.css('PatentHistory').first)
  resume.publication_history = Publication.parse(parsed_resume.css('PublicationHistory').first)
  resume.references = Reference.parse(parsed_resume.css('References').first)
  resume
end