Class: StatusCode
- Inherits:
-
Object
- Object
- StatusCode
- Defined in:
- lib/httpcode.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
- #code_and_message ⇒ Object
-
#initialize(symbol, code, message) ⇒ StatusCode
constructor
A new instance of StatusCode.
- #to_i ⇒ Object
Constructor Details
#initialize(symbol, code, message) ⇒ StatusCode
Returns a new instance of StatusCode.
7 8 9 |
# File 'lib/httpcode.rb', line 7 def initialize symbol, code, @symbol, @code, @message = symbol, code, end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/httpcode.rb', line 5 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/httpcode.rb', line 5 def @message end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
5 6 7 |
# File 'lib/httpcode.rb', line 5 def symbol @symbol end |
Instance Method Details
#code_and_message ⇒ Object
11 12 13 |
# File 'lib/httpcode.rb', line 11 def [code, ] end |
#to_i ⇒ Object
15 16 17 |
# File 'lib/httpcode.rb', line 15 def to_i code end |