class SoapyYandex::Response
Attributes
xml[R]
Public Class Methods
new(xml)
click to toggle source
# File lib/soapy_yandex/response.rb, line 7 def initialize(xml) @xml = xml end
Public Instance Methods
attributes()
click to toggle source
# File lib/soapy_yandex/response.rb, line 23 def attributes doc.nodes.first.attributes end
error?()
click to toggle source
# File lib/soapy_yandex/response.rb, line 15 def error? attributes[:status].to_i == 3 end
error_code()
click to toggle source
# File lib/soapy_yandex/response.rb, line 19 def error_code attributes[:error].to_i end
success?()
click to toggle source
# File lib/soapy_yandex/response.rb, line 11 def success? attributes[:status].to_i.zero? end
Private Instance Methods
doc()
click to toggle source
# File lib/soapy_yandex/response.rb, line 29 def doc @doc ||= Ox.parse(xml) end