Class: Aws::Stubbing::XmlError Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/stubbing/xml_error.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(error_code) ⇒ XmlError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of XmlError.



7
8
9
# File 'lib/aws-sdk-core/stubbing/xml_error.rb', line 7

def initialize(error_code)
  @error_code = error_code
end

Instance Method Details

#to_xmlObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
16
17
18
19
20
# File 'lib/aws-sdk-core/stubbing/xml_error.rb', line 11

def to_xml
  <<-XML.strip
<ErrorResponse>
  <Error>
    <Code>#{@error_code}</Code>
    <Message>stubbed-response-error-message</Message>
  </Error>
</ErrorResponse>
  XML
end