Class: PersevereResult
- Inherits:
-
Object
- Object
- PersevereResult
- Defined in:
- lib/persevere_client.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.
40 41 42 43 44 45 |
# File 'lib/persevere_client.rb', line 40 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.
33 34 35 |
# File 'lib/persevere_client.rb', line 33 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
33 34 35 |
# File 'lib/persevere_client.rb', line 33 def code @code end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
33 34 35 |
# File 'lib/persevere_client.rb', line 33 def location @location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
33 34 35 |
# File 'lib/persevere_client.rb', line 33 def @message end |
Class Method Details
.make(response) ⇒ Object
35 36 37 38 |
# File 'lib/persevere_client.rb', line 35 def PersevereResult.make(response) return PersevereResult.new(response["Location"], response.code, response.msg, response.body) end |
Instance Method Details
#to_s ⇒ Object
47 48 49 |
# File 'lib/persevere_client.rb', line 47 def to_s super + " < Location: #{ @location } Code: #{ @code } Message: #{ @message } >" end |