7 8 9 10 11 12 13 14 15 16
# File 'lib/pico_api/entities/errors.rb', line 7 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