Class: Ebay::Parser

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/ebay/parser.rb

Instance Method Summary collapse

Instance Method Details

#parseObject



7
8
9
10
11
12
13
# File 'lib/ebay/parser.rb', line 7

def parse
  if headers['Content-Type'].include?('xml')
    MultiXml.parse(body)
  else
    JSON.parse(body)
  end
end