Class: Cb::Responses::Resume

Inherits:
ApiResponse show all
Defined in:
lib/cb/responses/resumes/resume.rb

Instance Attribute Summary

Attributes inherited from ApiResponse

#models, #response

Instance Method Summary collapse

Methods inherited from ApiResponse

#initialize

Constructor Details

This class inherits a constructor from Cb::Responses::ApiResponse

Instance Method Details

#extract_modelsObject



8
9
10
# File 'lib/cb/responses/resumes/resume.rb', line 8

def extract_models
  response[root_node].map { |resume| Models::Resume.new(resume) }
end

#hash_containing_metadataObject



12
13
14
# File 'lib/cb/responses/resumes/resume.rb', line 12

def 
  response
end

#root_nodeObject



20
21
22
# File 'lib/cb/responses/resumes/resume.rb', line 20

def root_node
  'Results'
end

#statusObject



16
17
18
# File 'lib/cb/responses/resumes/resume.rb', line 16

def status
  response['Status']
end

#validate_api_hashObject



4
5
6
# File 'lib/cb/responses/resumes/resume.rb', line 4

def validate_api_hash
  required_response_field(root_node, response)
end