Sha256: 7da9f8c4ddc4fd1f9276d17a8ee3efa75bb9d0c3a8e34abbd345287c1d36c7fc

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 Bytes

Contents

# frozen_string_literal: true

module Magic
	module Lookup
		class Error < NameError
			def self.for object, lookup_class
				default_name = lookup_class.name_for object.class

				new "no #{lookup_class} found for #{object.class}, default name is #{default_name}",
						default_name, receiver: object
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
magic-lookup-0.2.0 lib/magic/lookup/error.rb
magic-lookup-0.1.0 lib/magic/lookup/error.rb