Module: ClickClient

Defined in:
lib/jiji/plugin/embedded/single_click_client.rb

Overview

エラー発生時に実行時例外になる場合があるので修正。

Class Method Summary collapse

Class Method Details

.parse(content) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/jiji/plugin/embedded/single_click_client.rb', line 10

def self.parse( content )
  doc = REXML::Document.new( content )
  unless ( doc.text( "./*/responseStatus" ) =~ /OK/  )
    error = doc.text( "./*/message" )
    raise "fail. #{error ? error : content }"
  end
  return doc
end