Class: FireEagle::Response
- Inherits:
-
Object
- Object
- FireEagle::Response
- Includes:
- HappyMapper
- Defined in:
- lib/fireeagle/response.rb
Class Method Summary collapse
Instance Method Summary collapse
- #fail? ⇒ Boolean
-
#success? ⇒ Boolean
does the response indicate success?.
- #user ⇒ Object
Class Method Details
.parse(xml, opts = {}) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/fireeagle/response.rb', line 12 def self.parse(xml, opts = {}) rsp = super(xml, opts) raise FireEagleException, rsp.error. if rsp.fail? rsp end |
Instance Method Details
#fail? ⇒ Boolean
20 21 22 |
# File 'lib/fireeagle/response.rb', line 20 def fail? status == "fail" end |
#success? ⇒ Boolean
does the response indicate success?
25 26 27 |
# File 'lib/fireeagle/response.rb', line 25 def success? status == "ok" end |
#user ⇒ Object
29 30 31 |
# File 'lib/fireeagle/response.rb', line 29 def user users[0] end |