Class: Pennyworth::Loaders::System::Error
- Inherits:
-
Object
- Object
- Pennyworth::Loaders::System::Error
- Defined in:
- lib/pennyworth/loaders/system/error.rb
Overview
Loads an array of system error records.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(errno: Errno, model: Models::System::Error) ⇒ Error
constructor
A new instance of Error.
Constructor Details
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/pennyworth/loaders/system/error.rb', line 13 def call(*) errno.constants .map { |name| errno.const_get name } .uniq .sort_by { |error| error::Errno } .map do |error| model[id: error::Errno, name: error.name, description: error.exception.] end end |