Class: Apiwork::Introspection::ErrorCode
- Inherits:
-
Object
- Object
- Apiwork::Introspection::ErrorCode
- Defined in:
- lib/apiwork/introspection/error_code.rb
Overview
Wraps error code definitions.
Instance Method Summary collapse
-
#description ⇒ String?
The description for this error code.
-
#initialize(dump) ⇒ ErrorCode
constructor
A new instance of ErrorCode.
-
#status ⇒ Integer
The status for this error code.
-
#to_h ⇒ Hash
Converts this error code to a hash.
Constructor Details
#initialize(dump) ⇒ ErrorCode
Returns a new instance of ErrorCode.
12 13 14 |
# File 'lib/apiwork/introspection/error_code.rb', line 12 def initialize(dump) @dump = dump end |
Instance Method Details
#description ⇒ String?
The description for this error code.
20 21 22 |
# File 'lib/apiwork/introspection/error_code.rb', line 20 def description @dump[:description] end |
#status ⇒ Integer
The status for this error code.
28 29 30 |
# File 'lib/apiwork/introspection/error_code.rb', line 28 def status @dump[:status] end |
#to_h ⇒ Hash
Converts this error code to a hash.
36 37 38 39 40 41 |
# File 'lib/apiwork/introspection/error_code.rb', line 36 def to_h { description: description, status: status, } end |