Class: NIFTY::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/NIFTY/responses.rb

Class Method Summary collapse

Class Method Details

.parse(options = {}) ⇒ Object

ニフティクラウドAPIのレスポンス解析クラス

@option options [String] :xml           


9
10
11
12
13
14
15
16
# File 'lib/NIFTY/responses.rb', line 9

def self.parse(options = {})
  options = {
    :xml => "",
    :parse_options => { 'forcearray' => ['item', 'member'], 'suppressempty' => nil, 'keeproot' => false }
  }.merge(options)

  return response = XmlSimple.xml_in(options[:xml], options[:parse_options])
end