lib/career_builder/api/resume.rb in career_builder-0.1.0 vs lib/career_builder/api/resume.rb in career_builder-0.1.1

- old
+ new

@@ -7,9 +7,25 @@ # Sample response: # http://ws.careerbuilder.com/resumes/resumes.asmx/V2_GetResume_SampleResponse include HappyMapper + module RawResponse + XML_START = %Q{<?xml version="1.0" encoding="utf-8"?>\n<string xmlns="http://ws.careerbuilder.com/resumes/">} + XML_END = %Q{</string>} + + def raw_response + XML_START + @raw_response + XML_END + end + end + + def self.parse(xml, options = {}) + resume = super + resume.instance_variable_set(:"@raw_response", xml) + resume.extend RawResponse + resume + end + tag 'Packet' # element :home_location, String, :tag => "HomeLocation" # element :last_update, Date, :tag => "LastUpdate" # element :title, String, :tag => "ResumeTitle"