Class: Plaza::Response
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Plaza::Response
- Defined in:
- lib/plaza/response.rb
Instance Method Summary collapse
Instance Method Details
#code ⇒ Object
21 22 23 |
# File 'lib/plaza/response.rb', line 21 def code status end |
#failed? ⇒ Boolean
13 14 15 |
# File 'lib/plaza/response.rb', line 13 def failed? [4, 5].include?(status.to_s[0].to_i) end |
#redirected? ⇒ Boolean
9 10 11 |
# File 'lib/plaza/response.rb', line 9 def redirected? status.to_s[0].to_i == 3 end |
#success? ⇒ Boolean
5 6 7 |
# File 'lib/plaza/response.rb', line 5 def success? status.to_s[0].to_i == 2 end |
#to_str ⇒ Object
17 18 19 |
# File 'lib/plaza/response.rb', line 17 def to_str body.to_s end |