Sha256: 4c183c2491b56e3ff7d4c45fb9a5d74bdaf74dc2959c0da90a022dda16c6a9be
Contents?: true
Size: 687 Bytes
Versions: 17
Compression:
Stored size: 687 Bytes
Contents
# frozen_string_literal: true module Pennyworth module Loaders module System # Loads an array of system error records. class Error def initialize errno: Errno, model: Models::System::Error @errno = errno @model = model end 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.message] end end private attr_reader :errno, :model end end end end
Version data entries
17 entries across 17 versions & 1 rubygems