Sha256: af9976503b06cc12b956561d17fd3b3f4b5b7fd5129ae9baf3e3479e98737394

Contents?: true

Size: 325 Bytes

Versions: 12

Compression:

Stored size: 325 Bytes

Contents

# typed: strict

module Typed
  class SerializationError < StandardError
    extend T::Sig

    sig { returns({error: String}) }
    def to_h
      {error: message}
    end

    sig { params(_options: T::Hash[T.untyped, T.untyped]).returns(String) }
    def to_json(_options = {})
      JSON.generate(to_h)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sorbet-schema-0.9.2 lib/typed/serialization_error.rb
sorbet-schema-0.9.1 lib/typed/serialization_error.rb
sorbet-schema-0.9.0 lib/typed/serialization_error.rb
sorbet-schema-0.8.0 lib/typed/serialization_error.rb
sorbet-schema-0.7.2 lib/typed/serialization_error.rb
sorbet-schema-0.7.1 lib/typed/serialization_error.rb
sorbet-schema-0.7.0 lib/typed/serialization_error.rb
sorbet-schema-0.6.0 lib/typed/serialization_error.rb
sorbet-schema-0.5.1 lib/typed/serialization_error.rb
sorbet-schema-0.4.2 lib/typed/serialization_error.rb
sorbet-schema-0.4.1 lib/typed/serialization_error.rb
sorbet-schema-0.4.0 lib/typed/serialization_error.rb