Class: OAI::Provider::Response::Error
- Defined in:
- lib/oai/provider/response/error.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(provider, error) ⇒ Error
constructor
A new instance of Error.
- #to_xml ⇒ Object
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_xml ⇒ Object
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 |