Sha256: 9058a324d7c8d849db395b4aa3bba8c5f5d0f111b9a3ba5b1b14a758833fa9f9

Contents?: true

Size: 390 Bytes

Versions: 27

Compression:

Stored size: 390 Bytes

Contents

module Foobara
  require_project_file("command_connectors", "serializer")

  module CommandConnectors
    module Serializers
      class ErrorsSerializer < Serializer
        # TODO: always_applicable? instead?
        def always_applicable?
          !request.outcome.success?
        end

        def serialize(errors)
          errors.map(&:to_h)
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.6 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.5 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.4 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.3 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.2 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.1 projects/command_connectors/src/serializers/errors_serializer.rb