Sha256: e11946988826a91ecebb2ddefef8e00f71b573baa6bbcdfab2dc7918fb29ad71
Contents?: true
Size: 511 Bytes
Versions: 10
Compression:
Stored size: 511 Bytes
Contents
# frozen_string_literal: true class BCDD::Result::Contract::Error < BCDD::Result::Error class UnexpectedType < self def self.build(type:, allowed_types:) new("type :#{type} is not allowed. Allowed types: #{allowed_types.map(&:inspect).join(', ')}") end end class UnexpectedValue < self def self.build(type:, value:, cause: nil) cause_message = " (#{cause.message})" if cause new("value #{value.inspect} is not allowed for :#{type} type#{cause_message}") end end end
Version data entries
10 entries across 10 versions & 1 rubygems