Sha256: 46e4be6e538a1c8c7dab765a62649da8d8eb4db78a6f261c26ef179a82b2a53b

Contents?: true

Size: 582 Bytes

Versions: 2

Compression:

Stored size: 582 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Yogurt
  module ErrorResult
    include Kernel
    extend T::Sig
    extend T::Helpers

    interface!

    sig {abstract.returns(T.nilable(T::Array[OBJECT_TYPE]))}
    def errors; end

    class OnlyErrors
      extend T::Sig
      include ErrorResult

      sig {params(errors: T::Array[OBJECT_TYPE]).void}
      def initialize(errors)
        @errors = T.let(errors, T::Array[OBJECT_TYPE])
      end

      sig {override.returns(T.nilable(T::Array[OBJECT_TYPE]))}
      def errors
        @errors
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yogurt-0.2.0 lib/yogurt/error_result.rb
yogurt-0.1.1 lib/yogurt/error_result.rb