Class: MySportsFeeds::Response::Error
- Inherits:
-
Object
- Object
- MySportsFeeds::Response::Error
- Defined in:
- lib/mysportsfeeds/response.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(error, status = 422) ⇒ Error
constructor
A new instance of Error.
- #success? ⇒ Boolean
Constructor Details
#initialize(error, status = 422) ⇒ Error
Returns a new instance of Error.
19 20 21 22 |
# File 'lib/mysportsfeeds/response.rb', line 19 def initialize(error, status = 422) @error = error @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
17 18 19 |
# File 'lib/mysportsfeeds/response.rb', line 17 def status @status end |
Instance Method Details
#body ⇒ Object
24 25 26 |
# File 'lib/mysportsfeeds/response.rb', line 24 def body { error: @error } end |
#success? ⇒ Boolean
28 29 30 |
# File 'lib/mysportsfeeds/response.rb', line 28 def success? false end |