Sha256: 2cc17c9a36ab9e2da6ab0759e8c38d4ab087a5dcc2145b31cdf9fa747e3efdd2

Contents?: true

Size: 488 Bytes

Versions: 4

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

require 'clean_architecture/types'
require 'dry/struct'

module CleanArchitecture
  module Entities
    class FailureDetails < Dry::Struct
      FailureTypes = Types::Strict::String.enum(
        'error',
        'expectation_failed',
        'not_found',
        'unauthorized'
      )

      attribute :type, FailureTypes
      attribute :message, Types::Strict::String
      attribute :other_properties, Types::Strict::Hash.default({})
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clean-architecture-1.1.1 lib/clean_architecture/entities/failure_details.rb
clean-architecture-1.1.0 lib/clean_architecture/entities/failure_details.rb
clean-architecture-1.0.1 lib/clean_architecture/entities/failure_details.rb
clean-architecture-1.0.0 lib/clean_architecture/entities/failure_details.rb