Class: ARFormattedError
Instance Method Summary collapse
- #to_json ⇒ Object
-
#to_xml ⇒ Object
provide this method, as if it is present it will be used to render the xml rather than XmlSimple.
Instance Method Details
permalink #to_json ⇒ Object
[View source]
67 68 69 |
# File 'lib/restrack/support.rb', line 67 def to_json "{\"errors\": [{\"error\": \"#{self}\"}]}" end |
permalink #to_xml ⇒ Object
provide this method, as if it is present it will be used to render the xml rather than XmlSimple
64 65 66 |
# File 'lib/restrack/support.rb', line 64 def to_xml "<?xml version=\"1.0\" encoding=\"UTF-8\"?><errors><error>#{self}</error></errors>" end |