Class: Sanford::Protocol::ResponseStatus::Code
- Inherits:
-
Struct
- Object
- Struct
- Sanford::Protocol::ResponseStatus::Code
- Defined in:
- lib/sanford-protocol/response_status.rb
Constant Summary collapse
- NAMES =
{ 200 => 'OK', 400 => 'BAD REQUEST', 404 => 'NOT FOUND', 408 => 'TIMEOUT', 422 => 'INVALID', 500 => 'ERROR' }.freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(number) ⇒ Code
constructor
A new instance of Code.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
28 29 30 |
# File 'lib/sanford-protocol/response_status.rb', line 28 def name @name end |
#number ⇒ Object
Returns the value of attribute number
28 29 30 |
# File 'lib/sanford-protocol/response_status.rb', line 28 def number @number end |
Instance Method Details
#to_s ⇒ Object
43 |
# File 'lib/sanford-protocol/response_status.rb', line 43 def to_s; "[#{[number, name].compact.join(', ')}]"; end |