Class: PersevereResult
- Inherits:
-
Object
- Object
- PersevereResult
- Defined in:
- lib/persevere.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(location, code, message, body) ⇒ PersevereResult
constructor
A new instance of PersevereResult.
- #to_s ⇒ Object
Constructor Details
#initialize(location, code, message, body) ⇒ PersevereResult
Returns a new instance of PersevereResult.
24 25 26 27 28 29 |
# File 'lib/persevere.rb', line 24 def initialize(location, code, , body) @location = location @code = code @message = @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
17 18 19 |
# File 'lib/persevere.rb', line 17 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
17 18 19 |
# File 'lib/persevere.rb', line 17 def code @code end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
17 18 19 |
# File 'lib/persevere.rb', line 17 def location @location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
17 18 19 |
# File 'lib/persevere.rb', line 17 def @message end |
Class Method Details
.make(response) ⇒ Object
19 20 21 22 |
# File 'lib/persevere.rb', line 19 def PersevereResult.make(response) return PersevereResult.new(response["Location"], response.code, response.msg, response.body) end |
Instance Method Details
#to_s ⇒ Object
31 32 33 |
# File 'lib/persevere.rb', line 31 def to_s super + " < Location: #{ @location } Code: #{ @code } Message: #{ @message } >" end |