Class: Ravelin::Response
- Inherits:
-
Object
- Object
- Ravelin::Response
- Defined in:
- lib/ravelin/response.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#ato ⇒ Object
readonly
Returns the value of attribute ato.
-
#client_reviewed_status ⇒ Object
readonly
Returns the value of attribute client_reviewed_status.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#score_id ⇒ Object
readonly
Returns the value of attribute score_id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#tag_names ⇒ Object
readonly
Returns the value of attribute tag_names.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(faraday_response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(faraday_response) ⇒ Response
Returns a new instance of Response.
18 19 20 21 22 23 24 25 26 |
# File 'lib/ravelin/response.rb', line 18 def initialize(faraday_response) return if faraday_response.body.nil? || faraday_response.body.empty? response_body = faraday_response.body tag(response_body) if response_body.key?('tagNames') event(response_body) if response_body.key?('data') @http_status = faraday_response.status @http_body = faraday_response.body end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def action @action end |
#ato ⇒ Object (readonly)
Returns the value of attribute ato.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def ato @ato end |
#client_reviewed_status ⇒ Object (readonly)
Returns the value of attribute client_reviewed_status.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def client_reviewed_status @client_reviewed_status end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def comment @comment end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def customer_id @customer_id end |
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def http_body @http_body end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def http_status @http_status end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def label @label end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def score @score end |
#score_id ⇒ Object (readonly)
Returns the value of attribute score_id.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def score_id @score_id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def source @source end |
#tag_names ⇒ Object (readonly)
Returns the value of attribute tag_names.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def tag_names @tag_names end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def @tags end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
3 4 5 |
# File 'lib/ravelin/response.rb', line 3 def warnings @warnings end |