Sha256: 86811c9875f2688630cbe56afc72c270cc7704a7d2f8d47289d7880eac8dc267

Contents?: true

Size: 278 Bytes

Versions: 6

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 kind
    :success
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bcdd-result-0.13.0 lib/bcdd/result/success/methods.rb
bcdd-result-0.12.0 lib/bcdd/result/success/methods.rb
bcdd-result-0.11.0 lib/bcdd/result/success/methods.rb
bcdd-result-0.10.0 lib/bcdd/result/success/methods.rb
bcdd-result-0.9.1 lib/bcdd/result/success/methods.rb
bcdd-result-0.9.0 lib/bcdd/result/success/methods.rb