Sha256: 910e07ce8973bc337062a1579bc925c87ccd5c07b1d68298dc616ec7505c8f1e
Contents?: true
Size: 498 Bytes
Versions: 7
Compression:
Stored size: 498 Bytes
Contents
# frozen_string_literal: true module PicoApi module Entities class Errors < ROM::Struct class << self def call(error) class_name = error.class.name.demodulize error_entities = [ Entities::Error.new( title: class_name.underscore, detail: error.message ) ] new(errors: error_entities) end end attribute? :errors, ROM::Types::Array(Entities::Error) end end end
Version data entries
7 entries across 7 versions & 1 rubygems