Module: Typed

Extended by:
T::Sig
Defined in:
lib/sorbet-result.rb,
lib/typed/result.rb,
lib/typed/no_error_on_success_error.rb,
lib/typed/no_payload_on_failure_error.rb

Overview

typed: strict frozen_string_literal: true

Defined Under Namespace

Classes: Failure, NoErrorOnSuccessError, NoPayloadOnFailureError, Result, Success

Class Method Summary collapse

Class Method Details

.Failure(error) ⇒ Object



159
160
161
# File 'lib/typed/result.rb', line 159

def self.Failure(error)
  Failure.new(error)
end

.Success(payload) ⇒ Object



150
151
152
# File 'lib/typed/result.rb', line 150

def self.Success(payload)
  Success.new(payload)
end