Class: Peddler::XMLParser Private

Inherits:
SimpleDelegator
  • Object
show all
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

ErrorParser, XMLResponseParser

Instance Method Summary collapse

Instance Method Details

#parseObject

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.



7
8
9
# File 'lib/peddler/xml_parser.rb', line 7

def parse
  @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)


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

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.



11
12
13
# File 'lib/peddler/xml_parser.rb', line 11

def xml
  MultiXml.parse(body)
end