Sha256: 4506ea76b4c1610c8db07a27d0b81461043b1c64a6411dd83428bf1429ae817a
Contents?: true
Size: 385 Bytes
Versions: 4
Compression:
Stored size: 385 Bytes
Contents
# frozen_string_literal: true module Kind class Error < TypeError def initialize(arg, object = UNDEFINED) if UNDEFINED == object # Will be used when the exception was raised with a message. e.g: # raise Kind::Error, "some message" super(arg) else super("#{object.inspect} expected to be a kind of #{arg}") end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
kind-5.1.0 | lib/kind/core/error.rb |
kind-5.0.0 | lib/kind/error.rb |
kind-4.1.0 | lib/kind/error.rb |
kind-4.0.0 | lib/kind/error.rb |