Sha256: f2390ab51a2e4cedd4d66d9f5bdeda22145ac3bf26a11e1bb89e641810485d89

Contents?: true

Size: 278 Bytes

Versions: 2

Compression:

Stored size: 278 Bytes

Contents

# frozen_string_literal: true

module BCDD::Result::Success::Methods
  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 name
    :success
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bcdd-result-0.8.0 lib/bcdd/result/success/methods.rb
bcdd-result-0.7.0 lib/bcdd/result/success/methods.rb