Class: Probasketball::Api::Response::Success
- Inherits:
-
Object
- Object
- Probasketball::Api::Response::Success
- Defined in:
- lib/probasketball/api/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(body, status = :ok) ⇒ Success
constructor
A new instance of Success.
- #success? ⇒ Boolean
Constructor Details
#initialize(body, status = :ok) ⇒ Success
Returns a new instance of Success.
5 6 7 8 |
# File 'lib/probasketball/api/response.rb', line 5 def initialize(body, status = :ok) @body = body @status = status end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/probasketball/api/response.rb', line 3 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/probasketball/api/response.rb', line 3 def status @status end |
Instance Method Details
#success? ⇒ Boolean
10 11 12 |
# File 'lib/probasketball/api/response.rb', line 10 def success? true end |