Sha256: e6c5c8cdc80e6e616eeee3bfe39eef3f4a762aa6e550045002e81cdc583f4d63

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

module Dolos
  class Result[A]

  end

  class Success[A] < Result[A]
    attr_reader captures: Array[untyped]
    attr_reader length: Integer
    attr_reader value: A

    def capture!: -> Success[A]

    def failure?: -> bool
    def success?: -> bool
  end

  class Failure < Result[bot]
    attr_reader committed: bool
    attr_reader error_position: Integer
    attr_reader message: String

    def captures: -> []

    def failure?: -> bool

    def map: [B](^(bot) -> B) -> Result[B]

    def success?: -> bool
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dolos-0.2.0 sig/dolos/result.rbs
dolos-0.1.3 sig/dolos/result.rbs