Sha256: 9058a324d7c8d849db395b4aa3bba8c5f5d0f111b9a3ba5b1b14a758833fa9f9

Contents?: true

Size: 390 Bytes

Versions: 26

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

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.25 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.24 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.23 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.22 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.21 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.20 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.19 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.18 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.17 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.16 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.15 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.14 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.13 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.12 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.11 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.10 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.9 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.8 projects/command_connectors/src/serializers/errors_serializer.rb
foobara-0.0.7 projects/command_connectors/src/serializers/errors_serializer.rb