Class: KStor::ErrorRegistry Private
- Inherits:
-
Object
- Object
- KStor::ErrorRegistry
- Defined in:
- lib/kstor/error.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #<<(klass) ⇒ Object private
- #[](code) ⇒ Object private
- #classes ⇒ Object private
-
#initialize ⇒ ErrorRegistry
constructor
private
A new instance of ErrorRegistry.
- #key?(code) ⇒ Boolean private
Constructor Details
#initialize ⇒ ErrorRegistry
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ErrorRegistry.
57 58 59 60 |
# File 'lib/kstor/error.rb', line 57 def initialize @error_classes = [] @index = nil end |
Instance Method Details
#<<(klass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
66 67 68 69 |
# File 'lib/kstor/error.rb', line 66 def <<(klass) @error_classes << klass @index = nil end |
#[](code) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
75 76 77 |
# File 'lib/kstor/error.rb', line 75 def [](code) index[code] end |
#classes ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
62 63 64 |
# File 'lib/kstor/error.rb', line 62 def classes @error_classes.values end |
#key?(code) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
71 72 73 |
# File 'lib/kstor/error.rb', line 71 def key?(code) index.key?(code) end |