Sha256: 837948a7f011b4762bf82b6356aee7b5ec575856825f79818577b3155bedfc6e

Contents?: true

Size: 302 Bytes

Versions: 1

Compression:

Stored size: 302 Bytes

Contents

# frozen_string_literal: true

module Solid
  module Success
    def success?(type = nil)
      type.nil? || type_checker.allow_success?([type])
    end

    def failure?(_type = nil)
      false
    end

    def value_or
      value
    end

    private

    def kind
      :success
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solid-result-2.0.0 lib/solid/success.rb