Sha256: 3b15fa0ca7a6a1c642f5dd40ca14117f96c9da3cbec19dce159e415d1baadb2d

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

class Solid::Result
  class Handler
    UNDEFINED: Object

    def initialize: (
      Solid::Result,
      type_checker: Solid::Result::Contract::TypeChecker
    ) -> void

    def []: (*Symbol) { (untyped, Symbol) -> void } -> untyped
    def failure: (*Symbol) { (untyped, Symbol) -> void } -> untyped
    def success: (*Symbol) { (untyped, Symbol) -> void } -> untyped
    def unknown: () { (untyped, Symbol) -> void } -> untyped

    alias type []

    private

    attr_reader result: Solid::Result
    attr_reader allowed_types: Solid::Result::Handler::AllowedTypes

    def outcome?: -> bool
    def outcome=: (Proc) -> void
    def outcome: -> untyped
  end
end

class Solid::Result::Handler
  class AllowedTypes
    attr_reader unchecked: Set[Symbol]
    attr_reader type_checker: Solid::Result::Contract::TypeChecker

    def initialize: (
      Solid::Result::Contract::TypeChecker
    ) -> void

    def allow?: (Array[Symbol]) -> bool
    def allow_success?: (Array[Symbol]) -> bool
    def allow_failure?: (Array[Symbol]) -> bool

    def all_checked?: -> bool

    private

    def check!: (Array[Symbol], bool) -> bool
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solid-result-2.0.0 sig/solid/result/handler.rbs