Class: Solr::Response::HttpStatus
- Inherits:
-
Object
- Object
- Solr::Response::HttpStatus
- Defined in:
- lib/solr/response/http_status.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, message:) ⇒ HttpStatus
constructor
A new instance of HttpStatus.
- #inspect ⇒ Object
Constructor Details
#initialize(status:, message:) ⇒ HttpStatus
Returns a new instance of HttpStatus.
16 17 18 19 20 |
# File 'lib/solr/response/http_status.rb', line 16 def initialize(status:, message:) @status = status @message = freeze end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
14 15 16 |
# File 'lib/solr/response/http_status.rb', line 14 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/solr/response/http_status.rb', line 14 def status @status end |
Class Method Details
.not_found ⇒ Object
9 10 11 |
# File 'lib/solr/response/http_status.rb', line 9 def not_found new(status: 404, message: 'Not Found') end |
.ok ⇒ Object
5 6 7 |
# File 'lib/solr/response/http_status.rb', line 5 def ok new(status: 200, message: 'OK') end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/solr/response/http_status.rb', line 22 def inspect "#{status} (#{})" end |