Class: OAI::Provider::Response::Error

Inherits:
Base
  • Object
show all
Defined in:
lib/oai/provider/response/error.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #provider

Instance Method Summary collapse

Methods inherited from Base

default_parameters, required_parameters, #response, valid_parameters

Constructor Details

#initialize(provider, error) ⇒ Error

Returns a new instance of Error.



4
5
6
7
# File 'lib/oai/provider/response/error.rb', line 4

def initialize(provider, error)
  super(provider)
  @error = error
end

Instance Method Details

#to_xmlObject



9
10
11
12
13
# File 'lib/oai/provider/response/error.rb', line 9

def to_xml
  response do |r|
    r.error @error.to_s, :code => @error.code
  end
end