class TWW::Response
Attributes
status[RW]
Public Class Methods
parse(xml)
click to toggle source
# File lib/tww/response.rb, line 9 def self.parse(xml) new.tap { |r| r.status = REXML::Document.new(xml).elements[1].text } end
Public Instance Methods
error?()
click to toggle source
# File lib/tww/response.rb, line 25 def error? status == 'Erro' end
na?()
click to toggle source
# File lib/tww/response.rb, line 21 def na? status == 'NA' end
nok?()
click to toggle source
# File lib/tww/response.rb, line 17 def nok? status == 'NOK' end
ok?()
click to toggle source
# File lib/tww/response.rb, line 13 def ok? status == 'OK' end