Class: OAI::Provider::Response::GetRecord
- Inherits:
-
RecordResponse
- Object
- Base
- RecordResponse
- OAI::Provider::Response::GetRecord
- Defined in:
- lib/oai/provider/response/get_record.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from RecordResponse
#data_for, #header_for, inherited
Methods inherited from Base
default_parameters, #initialize, required_parameters, #response, valid_parameters
Constructor Details
This class inherits a constructor from OAI::Provider::Response::Base
Instance Method Details
#to_xml ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/oai/provider/response/get_record.rb', line 6 def to_xml id = extract_identifier(.delete(:identifier)) unless record = provider.model.find(id, ) raise OAI::IdException.new end response do |r| r.GetRecord do r.record do header_for record data_for record unless deleted?(record) end end end end |