Sha256: 20b40435801d0421171a6c1884ca89714fa3ff48d2cdb840c3c96dcfaf58abcc

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

Stored size: 1.11 KB

Contents

class BCDD::Result
  class Handler
    UNDEFINED: Object

    def initialize: (
      BCDD::Result,
      type_checker: BCDD::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: BCDD::Result
    attr_reader allowed_types: BCDD::Result::Handler::AllowedTypes

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

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

    def initialize: (
      BCDD::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

6 entries across 6 versions & 1 rubygems

Version Path
bcdd-result-1.1.0 sig/bcdd/result/handler.rbs
bcdd-result-1.0.0 sig/bcdd/result/handler.rbs
bcdd-result-0.13.0 sig/bcdd/result/handler.rbs
bcdd-result-0.12.0 sig/bcdd/result/handler.rbs
bcdd-result-0.11.0 sig/bcdd/result/handler.rbs
bcdd-result-0.10.0 sig/bcdd/result/handler.rbs