Class: Peddler::XMLParser Private

Inherits:
SimpleDelegator
  • Object
show all
Extended by:
Forwardable
Includes:
Headers
Defined in:
lib/peddler/xml_parser.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.

Direct Known Subclasses

Errors::Parser, XMLResponseParser

Instance Method Summary collapse

Methods included from Headers

#mws_quota_max, #mws_quota_remaining, #mws_quota_resets_on, #mws_request_id, #mws_response_context, #mws_timestamp

Instance Method Details

#dataObject Also known as: parse

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.



16
17
18
# File 'lib/peddler/xml_parser.rb', line 16

def data
  @data ||= find_data
end

#valid?Boolean

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:

  • (Boolean)


26
27
28
29
# File 'lib/peddler/xml_parser.rb', line 26

def valid?
  return unless headers['Content-Length']
  headers['Content-Length'].to_i == body.size
end

#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.



22
23
24
# File 'lib/peddler/xml_parser.rb', line 22

def xml
  MultiXml.parse(body)
end